Skip to content

Commit

Permalink
[Lists] Fix reset issue (microsoft#2660)
Browse files Browse the repository at this point in the history
* Also reset `Value` when `SelectedOption` is reset

* Also reset `Value` when `SelectedOption` is reset. Fix microsoft#2645
  • Loading branch information
vnbaaij authored and dannyldj committed Sep 26, 2024
1 parent d5cfcf2 commit dc18b36
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Core/Components/List/ListComponentBase.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ public override async Task SetParametersAsync(ParameterView parameters)
{
// If the selected option is not in the list of items, reset the selected option
_currentSelectedOption = SelectedOption = default;
// and also reset the value
Value = null;
await SelectedOptionChanged.InvokeAsync(SelectedOption);
}
}
Expand Down

0 comments on commit dc18b36

Please sign in to comment.