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)
.