Answers for "blazor onchange event not firing with inputselect"

C#
0

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>
Posted by: Guest on July-03-2020
0

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;
}
Posted by: Guest on July-03-2020

C# Answers by Framework

Browse Popular Code Answers by Language