Feature Request - Option for Blazor's `NavigationManager.NavigateTo` to halt additional processing
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
### Is your feature request related to a problem? Please describe.
I'm trying to handle a default route parameter. When no route parameter is given, I'd like to call `NavigationManager.NavigateTo` to add a default route parameter to the URI. Doing so will allow the appropriate `NavLink` to be given the `active` class.
Alternatively, if `NavLink` can be given 2 Match options, that would also solve it.
### A clear and concise description of what the problem is.
The issue with calling `NavigationManager.NavigateTo` is that processing continues for a bit. For example, if I call `NavigationManager.NavigateTo` in `OnInitialized`, `OnParametersSetAsync` will still be called, which can cause an error or perform unnecessary work that the user must wait on.
### Describe the solution you'd like
Either `NavigationManager.NavigateTo` could halt immediately and perform the route navigation, or `NavLink` could accept an additional `Match` value.
Contributor guide
Assessment
This issue has not been assessed yet.