-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
What went wrong?
After selecting “A” in a MudSelectExtended
, calling its ValueChanged callback in code to set the value to “B” works—but then clicking “A” again in the dropdown does not fire ValueChanged
, so you can never go back to “A.”
Reproduction steps
- Create a page with:
<MudSelectExtended T="string"
Label="RenderFragment Based"
Value="@Test"
ValueChanged="TestValueChanged">
<MudSelectItemExtended Value="Foo" Text="Foo" />
<MudSelectItemExtended Value="Bar" Text="Bar" />
<MudSelectItemExtended Value="Fizz" Text="Fizz" />
<MudSelectItemExtended Value="Buzz" Text="Buzz" />
</MudSelectExtended>
<MudButton OnClick="()=>TestValueChanged("Fizz")">Test</MudButton>
@code {
private string Test;
private void TestValueChanged(string value)=>Test = value;
}
- Run, open dropdown, select
Foo
. - Click the Test button to programmatically change the value to
Fizz
. - Open dropdown again and select
Foo
— TestValueChanged("Foo") does not fire.
Expected behavior
After programmatically changing Value to “Fizz,” selecting “Foo” again should fire ValueChanged("Foo") and update the bound value.
Actual behavior
The UI shows Foo as selected in the list, but ValueChanged is never called, and the bound value remains “Fizz.”
Workarounds tried
Temporary: bind via SelectedValues="[Test]", which allows selecting the same item again but is not ideal for single-value scenarios.
konst-sh
Metadata
Metadata
Assignees
Labels
No labels