dotnet / dotnet/aspnetcore

NavigationManager.Refresh does not make use of optional parameter 'forceReload'

Open
#59,854 13 comments 0 reactions 0 assignees View on GitHub
area-blazor bug help wanted
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

Hey!

I wanted to use `NavigationManager.Refresh(forceReload: false)` on our .NET8 Blazor Server app and noticed that `forceReload` is not being passed through to `NavigateTo`, instead the `forceReload` of `NavigateTo` defaults to `true`. You can easily see what I mean in this file in line 178:
https://github.com/dotnet/aspnetcore/blob/8d6d208542cbfa4553ae59436cc90d84aac08c6a/src/Components/Components/src/NavigationManager.cs#L178

### Expected Behavior

I assume this is not intentional as I cannot come up with a reason why it would be. If the parameter exists one would expect it to be used, right?

### Steps To Reproduce

The code is obvious, but `NavigationManager.Refresh(forceReload: false)` reproduces the issue.

### Exceptions (if any)

None

### .NET Version

8.0.x

### Anything else?

I think the issue speaks for itsself.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.