Question regarding "history" router and the "cleanUrlOnDispose" parameter #6304
-
Hi everyone 😊 I have a question regarding the
As I understand the passage from the docs, when We are currently building an Algolia search application inside a Bootstrap Offcanvas. When users open the offcanvas, the instantsearch instance inits/starts. When users close the offcanvas, the instantsearch is disposed.
on the instantsearch instance, the search params are removed from the URL. So, with my understanding, the Is there any (other) built-in way to remember the query and refinements? Thank you and have a great week! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
That's indeed one of the use cases of this option, although the main one is to prevent a duplicate empty history entry when both InstantSearch disposes (writes empty url) and then an SPA router writes the next URL. Your use case should also be covered with that, unless maybe something else is also interacting with the URL at the same time as the offcanvas. Do you have a reproduction, as normally this should work fine |
Beta Was this translation helpful? Give feedback.
I've found the cause now (not sure why this wasn't noticed yet, related to timers I believe), so you can try out #6305 which I think will be merged and released soon