blazor onchange event not firing with inputselect code example
Example 1: blazor onchange event not firing with inputselect
<InputSelect ValueExpression="@(()=>comment.Country)"
Value="@comment.Country"
ValueChanged="@((string value) => OnValueChanged(value ))">
<option value="">Select country...</option>
<option value="USA">USA</option>
<option value="Britain">Britain</option>
<option value="Germany">Germany</option>
<option value="Israel">Israel</option>
</InputSelect>
Example 2: blazor onchange event not firing with inputselect
private Task OnValueChanged(string value)
{
// Assign the selected value to the Model
comment.Country = value;
return Task.CompletedTask;
}