Applying Multiple Refinements with One Button Click #6089
Unanswered
AbdelrahmanAhmed605
asked this question in
Q&A
Replies: 1 comment
-
You can use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using React InstantSearch and in my application I currently have multiple refinement facets (a
<SearchBox/>
with custom submitIconComponent and styles, a few components that use theuseRefinementList
hook, and a few components that use my own custom useRange hook calleduseCustomRange
).The challenge is that users need to apply refinements for each facet separately by clicking on individual "Apply" buttons. Each facet has its own refine function from its hook, making it cumbersome for users to refine their search.
Is there a way to have one "Apply" button that applies all refinements at once? The complication arises from needing to apply my custom
useCustomRange
hook to some of the facets.The solution I considered involves passing the states and refine functions of each facet to a parent component, then calling each individual refine function when the single "Apply" button is clicked. However, I'm seeking a more efficient approach that doesn't involve applying multiple refine functions.
Beta Was this translation helpful? Give feedback.
All reactions