From 414d0d59a36b3752c4d81046630216d2d47330a9 Mon Sep 17 00:00:00 2001 From: James Yeung Date: Thu, 22 Jun 2023 21:05:04 +0800 Subject: [PATCH] fix(module: tree-select): removing last option can't change the bind values (#3314) --- components/select/SelectBase.cs | 8 ++++---- components/tree-select/TreeSelect.razor.cs | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/components/select/SelectBase.cs b/components/select/SelectBase.cs index 0e1655d1..271ab31a 100644 --- a/components/select/SelectBase.cs +++ b/components/select/SelectBase.cs @@ -454,10 +454,10 @@ namespace AntDesign return; } - if (!SelectOptionItems.Any()) - { - return; - } + //if (!SelectOptionItems.Any()) + //{ + // return; + //} if (values == null) { diff --git a/components/tree-select/TreeSelect.razor.cs b/components/tree-select/TreeSelect.razor.cs index dc24fe0d..70d8bd7c 100644 --- a/components/tree-select/TreeSelect.razor.cs +++ b/components/tree-select/TreeSelect.razor.cs @@ -81,7 +81,7 @@ namespace AntDesign [Parameter] public bool ShowTreeLine { get; set; } [Parameter] public bool ShowLeafIcon { get; set; } - + [Parameter] public IDictionary TreeAttributes { get; set; } [Parameter] public EventCallback> OnNodeLoadDelayAsync { get; set; } @@ -467,7 +467,6 @@ namespace AntDesign if (_selectedValues?.Any() != true) { ClearOptions(); - return; } CreateOptions(_selectedValues);