C#C
C#3y ago
Camster

❔ Blazor Cascading Parameter with Async Change Event

Hi! I have a working cascading parameter, where the child component has a CascadingParameter property. It works just fine, when the parent changes the value, the value is propagated to the child.

The difficulty I'm having is that I want the child component to do some async server work when that value changes. Think of it as a cascading drop down - the parent has a drop down, and when a value is selected, the child component needs to go to the server to get data to fill a child drop down. I'm just not sure how to do that. The child component obviously has a get/set event on the cascading value, but I don't think you can do an async call from the set event.

I've tried to do some googling, but everything I find talks about how to propagate values up the chain via EventCallback, which is the reverse of what I need to do. Thank you for your help!
Was this page helpful?