From dc18b368d570965506484476059128484ff7490c Mon Sep 17 00:00:00 2001 From: Vincent Baaij Date: Mon, 16 Sep 2024 09:38:14 +0200 Subject: [PATCH] [Lists] Fix reset issue (#2660) * Also reset `Value` when `SelectedOption` is reset * Also reset `Value` when `SelectedOption` is reset. Fix #2645 --- src/Core/Components/List/ListComponentBase.razor.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Core/Components/List/ListComponentBase.razor.cs b/src/Core/Components/List/ListComponentBase.razor.cs index a1bf82e3df..eaea5bae0d 100644 --- a/src/Core/Components/List/ListComponentBase.razor.cs +++ b/src/Core/Components/List/ListComponentBase.razor.cs @@ -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); } }