Closed rtman closed 5 years ago
The state of the RefinementList
inside the modal is not persisted because the onSearchStateChange
callback only apply the current state. Inside our React Native example we do merge the previous and the current state. Here is your example updated.
Ah ok, I was following another guide from the react-instantsearch docs on your site which doesn't show previous and current state merging. Can you guys update the docs ?
We are in the process of re-writing the full documentation, this issue will be fixed at that time. Thanks for spotting the issue though!
Hi,
So for my web app I want to put our refinements in a modal. I've followed the guide for doing this and still the refinements applied in the modal are cleared when the modal is closed. Maybe I've made a mistake or am using the Virtual Widget incorrectly??
I also notice a significant slowdown when passing searchstate and onSearchStateChanged between the two InstantSearch instances. If I comment out those two props on the 1st instance the slowdown disappears. This effect isn't as noticeable in the codesandbox but in my actual app the slowdown is severe.
Here is my codesandbox illustrating the issue.
https://codesandbox.io/s/3y7kw953ym