I do not seem to be able to supply a callback from the parent component to the child, when teh child is rnedered using ““““`@Body“`:
<CascadingValue Value="isGB">
<CascadingValue Value="HandleChange">
@Body
</CascadingValue>
</CascadingValue>
</div>```
@code {
private void HandleChange(bool isgb)
{
throw new Exception();
isGB = isgb;
StateHasChanged();
}
}
What I ave in the child component:
[CascadingParameter]
public EventCallback<bool> HandleChange { get; set; }
private async Task ChangeIsGB(bool isgb)
{
IsGB = isgb;
await HandleChange.InvokeAsync(isgb);
}
But the event does not fire, sadly enough. Why?