CascadingParameter availability
See original GitHub issueHello, While looking at your samples, I could find a lot of useful information. However, I couldn’t find anything about CascadingParameter usage.
I tried to pass a string parameter and it is always null. in view model:
[CascadingParameter]
public string SomeValue { get; set; }
and in a parent component
<CascadingValue Value="AStringProperty">...</CascadingValue>
Also, I’m using <CascadingAuthenticationState> in App.Razor which should be available as a cascading a param, as well.
[CascadingParameter]
public Task<AuthenticationState> AuthenticationStateTask { get; set; }
It is also null in the view model
Could you please advise?
Thank you in advance
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Understanding Cascading Values & Cascading Parameters
The descendant components can then choose to collect the value by declaring a property of the same type, decorated with the [CascadingParameter] ...
Read more >ASP.NET Core Blazor cascading values and parameters
In this article. CascadingValue component; [CascadingParameter] attribute; Cascade multiple values; Pass data across a component hierarchy.
Read more >Cascading Values And Parameters In Razor Components
Descendant components opt in to cascaded values by declaring a property decorated with the [CascadingParameter] attribute.
Read more >Understand Cascading Parameters and Cascading Values in ...
As you can see the Value property is now decorated with [CascadingParameter] attribute. To set the Value cascading parameter from the Index.
Read more >Blazor - Cascade username to all components
I'm struggling to get the windows username available to all components and accessible from within the @code section though.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This will be available with the next update.
Since I first posted, I’ve gotten busier and can’t help directly right now. However, I do know the issue, so if you need someone to check (e.g. with the Telerik controls), I could do that. Good luck!