How to remove showFilter button when no results on mobile view


when our App in Desktop mode, i dont see showfilter until results are populated. But on mobile view i can see a button with "showFilters" when there is no results populated. how to hide or remove until results are available.

Mobile view:

Desktop view:


Unfortunately there's no built in way to hide that when there are no results.

If you can, submit an issue to the search-ui repository GitHub - elastic/search-ui: Search UI. Libraries for the fast development of modern, engaging search experiences., we could add a new check to hide that when a search has not be performed yet.

In the meantime, you could use the wasSearched state to conditionally add a CSS class that hides that button.

You could also enable the alwaysSearchOnInitialLoad flag so that you never get into this state.

Hey, Thanks for the workaround.