What is the best way to clear a specific filter when using multiple FilterSearch bars?

I’m trying to build a search experience with three <FilterSearch /> components tied to 3 different fields. I used the onSelect parameter for a callback to create a filter using searchActions.setFilterOption(<filter>) for each search bar.

Is there any function to remove a specific filter out of the three (when a user deletes all the text in a certain search bar for example) or set the selected property to false so that a search can be conducted without that filter? I’ve tried using the <ApplyFiltersButton /> component to run the search, but it doesn’t recognize the search bar being cleared after running the previous search, so it runs the same search again. I am checking the state of the filters using const filterstate = useSearchState((state) => state.filters.static).

Hey Rohit,

It looks like you’ve discovered a bug in our component. Your code for checking the state of the filters is correct. I’m going to bring this up with our engineering team and let you know once it’s been fixed. Stay tuned!