From 68d203dff9d38eb2ca55385a9ce37949144d1e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=AD=94=E7=8E=8B?= <40223749+LYErin@users.noreply.github.com> Date: Wed, 15 Sep 2021 02:08:09 +0800 Subject: [PATCH] fix(select): shouldn't focus input when closing tag with f ilterable (#1173) Co-authored-by: unknown --- CHANGELOG.en-US.md | 4 ++++ CHANGELOG.zh-CN.md | 4 ++++ src/select/src/Select.tsx | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 4c4146b63..83855ca60 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -1,5 +1,9 @@ # CHANGELOG +### Fixes + +- Fix `n-select` focus input when closing tag with `filterable` , closes [#1170](https://github.com/TuSimple/naive-ui/issues/1170). + ## 2.18.2 (2021-09-14) ### Feats diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 565d8ed63..61bde385b 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -1,5 +1,9 @@ # CHANGELOG +### Fixes + +- 修复 `n-select` `filterable` 下关闭标签 input 光标聚焦问题,关闭 [#1170](https://github.com/TuSimple/naive-ui/issues/1170) + ## 2.18.2 (2021-09-14) ### Feats diff --git a/src/select/src/Select.tsx b/src/select/src/Select.tsx index 77dc4e3e2..a10a8ded6 100644 --- a/src/select/src/Select.tsx +++ b/src/select/src/Select.tsx @@ -494,7 +494,6 @@ export default defineComponent({ changedValue.push(option.value) patternRef.value = '' } - focusSelectionInput() doUpdateValue(changedValue, getMergedOptions(changedValue)) } else { if (tag && !remote) {