From efec02b1d9a25db071cbc3482625ccfb6d7c3a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=83=E9=B1=BC=E7=9A=84=E5=B8=86?= Date: Wed, 18 Oct 2023 14:38:26 +0800 Subject: [PATCH] fix: issues 1560 Wrong number of tags after selection under ellipsisTrigger (#1859) --- packages/semi-ui/select/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/semi-ui/select/index.tsx b/packages/semi-ui/select/index.tsx index f11c54c419..9731324c9f 100644 --- a/packages/semi-ui/select/index.tsx +++ b/packages/semi-ui/select/index.tsx @@ -1094,7 +1094,9 @@ class Select extends BaseComponent { const { maxTagCount } = this.props; const maxVisibleCount = selections.size - maxTagCount; const newOverFlowItemCount = maxVisibleCount > 0 ? maxVisibleCount + items.length - 1 : items.length - 1; - if (items.length > 1 && overflowItemCount !== newOverFlowItemCount) { + + // fix: issues 1560 + if (items.length >= 1 && overflowItemCount !== newOverFlowItemCount) { this.foundation.updateOverflowItemCount(selections.size, newOverFlowItemCount); } }