Skip to content

InstantSearch React ToggleRefinement off parameter #4474

Answered by Haroenv
RichardJohnn asked this question in General
Discussion options

You must be logged in to vote

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 …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RichardJohnn
Comment options

Answer selected by Haroenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Library: React InstantSearch < 7 Issues in any of the react-instantsearch@6 packages
2 participants