I have the following Code for an InputSelect
<InputSelect class="form-control form-control form-control-sm" placeholder="Role" disabled="@IsReadOnly" @bind-Value="Model.Role" @onchange="@RoleChanged"><option value="Member">Member</option><option value="Admin">Admin</option><option value="Pioner">Pioneer</option><option value="Retailer">Retailer</option></InputSelect>
And for the Code:
bool ShowCreated;bool ShowUpdated;bool IsReadOnly;string SelectedRole;public EditForm AccountForm;public Multi.Dtos.RegistrationDto Model = new Dtos.RegistrationDto() { Role = "Member" };public void RoleChanged(ChangeEventArgs e){ SelectedRole = e.Value.ToString(); Console.WriteLine(e.Value);}
The RoleChange function is not invoked when i try to select a new item. Can someone point out what wrong with this. The value of the proper has changed but the Event was not called.