Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Nesting bindable components within components Blazor

$
0
0

Say I have the following scenario:

Parent.razor

<Child bind-Value=registration />@code{ Registration registration = new(); }

Child.razor

<InputText class="form-control" @bind-Value=Value.Signature/>  @code{  [Parameter] public Registration? Value { get; set; }  [Parameter] public EventCallback<Registration?> ValueChanged { get; set; }  [Parameter] public Expression<Func<Registration?>>? ValueExpression { get; set; }  private async Task OnValueChanged(Registration? value)  => await this.ValueChanged.InvokeAsync(value); }

The signature InputText from the Child component does not get updated on the parent component; I've added the Value/ValueChanged/ValueExpression but it's not syncing up.

Is there something else I need to add?


Viewing all articles
Browse latest Browse all 4839

Trending Articles