Using multiple filters in Configure's filter prop doesn't update results

I’m using the filters prop in Configure to update filters dynamically, at first I have this filter set:

“NOT ObjectID:(objectID)”

After I change a state variable, in the render function I update the filter to:

“NOT ObjectID:(objectID) AND isPremium:true”

Works, but only if I don’t change the refinements before switching it again.
What I’m doing wrong that I can’t get it to work reliably?

1 Like

Hi @carles,

Can you use this jsfiddle to provide a small example illustrating your issue with Configure?

Configure search parameters are computed from their props. Is by any chance when performing refinements you’re passing back the old props?

You can also take a look at this recipe that show how search parameters can be updated through configure:

Thanks @marielaure.thuret ,
I updated the jsfiddle to show what I wanted to do, but in the process I also locally updated react-instantsearch from 3.1.0 to 3.2.0, and the problem was gone.

Thanks @carles! Are you good with 3.2.0 then?

When adding configure search parameters to the search state for the 3.0.0 we encountered some issues to re-read from it. So in 3.2.0, what we do is that configure search parameters are only read from their props.

1 Like

Yes, now it works without problems and updates whenever I pass new values to the filters prop. :slight_smile: