Skip to content

Multiple cascading parameters update from child component issue  #26465

@maryamhdr

Description

@maryamhdr

Describe the bug

I've an application which has one cascading parameter. In app's header component, I'm displaying some values based on the cascading parameter and in child parameter, I change properties of that cascading parameter object, and everything works like a charm. But when I add another cascading parameter, I face an issue when header component's UI which is dependent on both cascading parameters, doesn't update as expected.

To Reproduce

I've an app located at https://github.com/maryamhdr/BlazorMultipleCascadingParametersIssue.
The app's header shows title and subtitle which are cascading parameters.
In FirstPage's OnInitialized, I set title and subtitle to 1 and in SecondPage I set those cascading parameters to value 2.

I'd expect to see "1 - 1" in while I'm in FirstPage, and "2 - 2" while I'm in SecondPage but sometimes I see "1 - 1" in SecondPage and "2 - 2" in FirstPage which is not expected at all.

Note that If I merge props of both cascading parameters into one cascading parameter, everything works fine!

Further technical details

  • ASP.NET Core version 5rc1
  • Include the output of dotnet --info
    .NET SDK (reflecting any global.json):
    Version: 5.0.100-rc.1.20452.10
    Commit: 473d1b592e

Runtime Environment:
OS Name: Windows
OS Version: 10.0.18363
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.100-rc.1.20452.10\

Host (useful for support):
Version: 5.0.0-rc.1.20451.14
Commit: 38017c3935

.NET SDKs installed:
3.1.401 [C:\Program Files\dotnet\sdk]
5.0.100-preview.8.20417.9 [C:\Program Files\dotnet\sdk]
5.0.100-rc.1.20452.10 [C:\Program Files\dotnet\sdk]

  • The IDE (VS / VS Code/ VS4Mac) you're running on, and it's version
    Microsoft Visual Studio Community 2019 Preview
    Version 16.8.0 Preview 3.0

https://github.com/maryamhdr/BlazorMultipleCascadingParametersIssue

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected-fewThis issue impacts only small number of customersarea-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.feature-blazor-builtin-componentsFeatures related to the built in components we ship or could ship in the futurefeature-blazor-component-modelAny feature that affects the component model for Blazor (Parameters, Rendering, Lifecycle, etc)investigateseverity-majorThis label is used by an internal tool

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions