Describe the bug
I have a select filter that updates the URL query parameters whenever the selected filter value changes. The URL is updated using rx.call_script with window.history.replaceState.
Before upgrading to Reflex 0.9, updating the URL this way would also update the route query values accessible through self.router.url.query.
After upgrading to Reflex 0.9, the browser URL changes correctly, but self.router.url.query no longer reflects the updated query parameters.
I run with reflex run --env prod
To Reproduce
Steps to reproduce the behavior:
- Create a select filter component, for instance with query parameter: name.
- On filter change, update the URL query parameters using:
rx.call_script(
"window.history.replaceState({}, '', '?name=test')"
)
- Read the current query parameters from: self.router.url.query
- Observe that after the URL is updated, self.router.url.query still contains the old values.
Expected behavior
When the URL query parameters are modified via window.history.replaceState, the router state should stay in sync and self.router.url.query should reflect the updated query parameters.
Screenshots
If applicable, add screenshots to help explain your problem.
Specifics (please complete the following information):
- Python Version: 3.11
- Reflex Version: 0.9.4
- OS: Linux
- Browser (Optional): Chrome
Additional context
Add any other context about the problem here.
Describe the bug
I have a select filter that updates the URL query parameters whenever the selected filter value changes. The URL is updated using rx.call_script with window.history.replaceState.
Before upgrading to Reflex 0.9, updating the URL this way would also update the route query values accessible through self.router.url.query.
After upgrading to Reflex 0.9, the browser URL changes correctly, but self.router.url.query no longer reflects the updated query parameters.
I run with reflex run --env prod
To Reproduce
Steps to reproduce the behavior:
rx.call_script(
"window.history.replaceState({}, '', '?name=test')"
)
Expected behavior
When the URL query parameters are modified via window.history.replaceState, the router state should stay in sync and self.router.url.query should reflect the updated query parameters.
Screenshots
If applicable, add screenshots to help explain your problem.
Specifics (please complete the following information):
Additional context
Add any other context about the problem here.