InstantSearch React ToggleRefinement off parameter #4474
-
Looking at #905 I see a solution for setting the Is there a way to set the unchecked, Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @RichardJohnn, this isn't currently an option for React InstantSearch. Since React InstantSearch does not use InstantSearch behind the hood, adding support for that needs to be manually added, by adding an else clause to and in that clause add a disjunctive refinement for the "off value". You can do this either by forking, using patch-package or copying the implementation into your code base. Since this has been a feature for a while in InstantSearch, but has never been in React InstantSearch, could you open an issue there so we can gauge interest by the number of upvotes on the ticket? Thanks! |
Beta Was this translation helpful? Give feedback.
Hi @RichardJohnn, this isn't currently an option for React InstantSearch. Since React InstantSearch does not use InstantSearch behind the hood, adding support for that needs to be manually added, by adding an else clause to
https://github.com/algolia/react-instantsearch/blob/master/packages/react-instantsearch-core/src/connectors/connectToggleRefinement.js#L156
and in that clause add a disjunctive refinement for the "off value". You can do this either by forking, using patch-package or copying the implementation into your code base.
Since this has been a feature for a while in InstantSearch, but has never been in React InstantSearch, could you open an issue there so we can gauge interest …