Skip to content

Commit b3cbe18

Browse files
novlan1tdesign-bot
andauthored
fix(select-input): avoid reRender all tags when delete one (#5868)
* fix(select-input): avoid reRender all tags when delete one * chore: stash changelog [ci skip] --------- Co-authored-by: tdesign-bot <[email protected]>
1 parent b48a3a6 commit b3cbe18

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/components/tag-input/hooks/useTagList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function useTagList(props: TagInputProps) {
7979
const tagContent = renderTNode('tag', { params: { value: item } });
8080
return (
8181
<Tag
82-
key={`${item}${index}`}
82+
key={index}
8383
size={size.value}
8484
disabled={isDisabled.value}
8585
onClose={(context: { e: MouseEvent }) => onClose({ e: context.e, index })}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
pr_number: 5868
3+
contributor: novlan1
4+
---
5+
6+
- fix(`SelectInput`): 避免删除标签时闪烁 @novlan1 ([#5868](https://github.com/Tencent/tdesign-vue-next/pull/5868))

0 commit comments

Comments
 (0)