Blazorise
Blazorise copied to clipboard
SelectList not executing the callback set for SelectedValueChanged
Blazorise Version
1.5.3
What Blazorise provider are you running on?
None
Link to minimal reproduction or a simple code snippet
<SelectList DefaultItemDisabled DefaultItemHidden=true DefaultItemText="Pick a data type" TItem="DataType" Data="Foo.DataTypes" TValue="int" ValueField="@((x) => x.ID)" TextField="@((x) => x.NameOfType)" SelectedValue="Foo.Bar.DataTypeID" SelectedValueChanged="(e) => TheDataTypeChanged(e)"/>
void TheDataTypeChanged(int newValue) { Foo.Bar.DataTypeID = newValue; Foo.CallStateHasChanged(); }
Steps to reproduce
- Set a breakpoint in the "TheDataTypeChanged" method
- First you need to create a class called Foo that has a list of datatypes and a Bar object that is = new Bar();
- Make sure datatypes is initialized (DataType class has an ID and a Name)
- Choose a datatype from the select list dropdown
What is expected?
I should hit the breakpoint in the "TheDataTypeChanged" method
What is actually happening?
Never hits the breakpoint.
What browsers do you see the problem on?
Chrome
Any additional comments?
No response