Skip to content

Changing operator of a refinement list erases any existing refinements #6507

Answered by Haroenv
callmekatootie asked this question in Q&A
Discussion options

You must be logged in to vote

It's a feature and a limitation of the way the change in parameters is handled. When a parameter of a widget changes, it's assumed that the previous widget stops displaying and a new widget with the new parameters gets added. If for example you'd change the attribute, the refinement obviously should be cleared. For operator that could be an exception that the state could be kept, but there's no functionality of that.

You'll have to keep track of the state before changing the operator (eg via ui state from useInstantSearch) and re-apply it after changing the operator.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@callmekatootie
Comment options

@Haroenv
Comment options

@callmekatootie
Comment options

@Haroenv
Comment options

Answer selected by callmekatootie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants