You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
How would you suggest keeping track of the state of selected filters for the purpose of saving a search?
We have a "saved search" feature that I'm trying to refactor (See screenshot) but I can't figure out an ideal way to track the state of which filters have been selected. I've tried the following:
Parsing the URL params. This is messy and in the past some edge cases have ruled this out.
Accessing the ReactiveSearch Redux store. I understand the store is created with the __REACTIVESEARCH__ key, but I can't figure out how to access it.
The "selectedValues" prop in the SelectedFilters component gives me exactly what I need, but I can't access it either.
Issue Type:
enhancement
Platform:
Web, React
Description:
How would you suggest keeping track of the state of selected filters for the purpose of saving a search?
We have a "saved search" feature that I'm trying to refactor (See screenshot) but I can't figure out an ideal way to track the state of which filters have been selected. I've tried the following:
Parsing the URL params. This is messy and in the past some edge cases have ruled this out.
Accessing the ReactiveSearch Redux store. I understand the store is created with the
__REACTIVESEARCH__key, but I can't figure out how to access it.The "selectedValues" prop in the SelectedFilters component gives me exactly what I need, but I can't access it either.
Currently I'm using the "onValueChange" prop to track state changes and but it isn't ideal for many reasons (primarily reusability across the app.) Related issue (Best way to get the values selected via MultiList(refinement list) #398)
How would you suggest going about this?
My suggestion is to expose the selectedValues prop in the SelectedFilters component.
Reactivesearch version:
2.14.1
Screenshot:
