Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NavManager suppressLocationChanged option #25782

Closed

Conversation

zbecknell
Copy link
Contributor

@zbecknell zbecknell commented Sep 10, 2020

Summary of the changes

  • Adds an option to suppress the LocationChanged event when navigating with NavigationManager.

Addresses #25767.

This is just an example implementation. The real thing would wait on the results from #25752 to use a new NavigationOptions object if that's the result.

Could using this option cause unexpected behavior? Perhaps... but it's completely opt-in. Someone using this would know what particular problem they're trying to solve. I hope the possibility of side-effects doesn't stop this being a viable option, as applying workarounds to get to this outcome are all sub-optimal.

(Note: I know there are tests failing, but since this is an example PR that is waiting for #25752, I'm not going to cloud up the file changes with fixing test objects that will need to be re-worked when the real PR comes about later.)

@zbecknell
Copy link
Contributor Author

Fixing the build issues -- I didn't build locally since this was a quick example.

@Pilchie Pilchie added the area-blazor Includes: Blazor, Razor Components label Sep 10, 2020
@SteveSandersonMS
Copy link
Member

I'll close this since the original requirement was addressed in a different way in #25767, and we'd rather not make NavigationManager harder to understand by adding extra cases where it doesn't behave as normal. Hope that's OK!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants