You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we define a custom onStateChange props, url query params are not "set" on load via routing={true}.
If not, routing={true} works as expected with default query params
At load:
With onStateChange={({ uiState, setUiState}) => setUiState(uiState)} routing
馃悰 Current behavior
When we define a custom
onStateChange
props, url query params are not "set" on load viarouting={true}
.If not,
routing={true}
works as expected with default query paramsAt load:
With
onStateChange={({ uiState, setUiState}) => setUiState(uiState)} routing
With
routing
Seems related to #4795
CodeSandbox sample:
https://codesandbox.io/p/sandbox/hungry-borg-tkntsx?file=%2Fsrc%2FApp.tsx
馃攳 Steps to reproduce
<InstantSearch routing>
component in your page, with some widgets likerefinementList
or otherinitialUiState
props (ex:initialUiState={{ 'YOUR_INDEX': { refinementList: { ATTRIBUTE: ['VALUE'] } }}
onStateChange={({ uiState, setUiState }) => setUiState(uiState)}
propsLive reproduction
https://codesandbox.io/
馃挱 Expected behavior
We expect to see url params reflecting our uiState, even if we set a custom
onStateChange
props onInstantSearch
component.Package version
react-instantsearch v7.7.0
Operating system
No response
Browser
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: