conditional state for search button