Skip to content

Commit

Permalink
fix: issues 1560 Wrong number of tags after selection under ellipsisT…
Browse files Browse the repository at this point in the history
…rigger (#1859)
  • Loading branch information
Jon-Millent authored Oct 18, 2023
1 parent 205b13c commit efec02b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/semi-ui/select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,9 @@ class Select extends BaseComponent<SelectProps, SelectState> {
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);
}
}
Expand Down

0 comments on commit efec02b

Please sign in to comment.