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
[release/8.0] [Blazor] Fix for URLs/querystrings not updating for interactive components when using SSR routing (#51279)
# Invoke `LocationChanged` for interactive components when an enhanced navigation occurs
This PR makes the `LocationChanged` event get invoked for interactive runtimes when an enhanced navigation occurs.
## Description
This PR makes the following changes:
* The `LocationChanged` event gets invoked for all interactive runtimes when either a client-side or enhanced navigation occurs
* Previously:
* An enhanced navigation would have not invoked the `LocationChanged` event in interactive runtimes
* A client-side navigation would only invoke the `LocationChanged` event for the runtime that started most recently
* Attempting to enable interactive routing from multiple interactive runtimes results in an error at runtime
* If an interactive router is present but multiple runtimes are available, the `LocationChanging` event only gets invoked for the runtime that has the interactive router
* It would take additional work to allow either runtime to cancel a client-side navigation, and that's outside the scope of this PR. We have #48766 to track doing the extra work to support this scenario
Fixes#51216
## Customer Impact
Without this changes the customers will encounter problems with UI being correctly updated during enhanced navigation because `LocationChanging` event not firing.
Besides the UI not updating correctly this will also cause customer registered handlers for the `LocationChanged` event not firing resulting in unexpected behaviors.
## Regression?
- [ ] Yes
- [x] No
[If yes, specify the version the behavior has regressed from]
## Risk
- [ ] High
- [ ] Medium
- [x] Low
Despite the size of this change, we have quite extensive automated tests (including these newly added ones) around the interactive routing scenarios, so we expect that nothing will break from this change.
## Verification
- [x] Manual (required)
- [x] Automated
## Packaging changes reviewed?
- [ ] Yes
- [x] No
- [ ] N/A
----
## When servicing release/2.1
- [ ] Make necessary changes in eng/PatchConfig.props
---------
Co-authored-by: Surayya Huseyn Zada <[email protected]>
Co-authored-by: Surayya Huseyn Zada <[email protected]>
0 commit comments