react to clicking the search button