Skip to content

useRefinementList hook multiple filters are ignored #5360

Answered by tadinski
tadinski asked this question in Q&A
Discussion options

You must be logged in to vote

Answering my own question here.

refine function works differently than how I understood it did at first.
It can only accept one attribute at a time. To apply multiple attributes, you have to pass OR operator property to useRefinementList hook.

Here's an example
https://codesandbox.io/s/hooks-example-kjsnn?file=/components/RefinementList.tsx

Replies: 0 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by tadinski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Library: React InstantSearch ≥ 7 Issues in any of the react-instantsearch@7 packages (formerly named react-instantsearch-hooks)
1 participant