From 162d1fcf959de62f6bb91ca228fcb1c8e1262778 Mon Sep 17 00:00:00 2001 From: ashu-guo <65716236+aShu-guo@users.noreply.github.com> Date: Fri, 19 Apr 2024 22:46:19 +0800 Subject: [PATCH] fix(AutoComplete): #7380 and #7276 (#7391) --- components/input/TextArea.tsx | 2 +- components/vc-input/Input.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/components/input/TextArea.tsx b/components/input/TextArea.tsx index e7cb01313..f39da97d2 100644 --- a/components/input/TextArea.tsx +++ b/components/input/TextArea.tsx @@ -172,7 +172,7 @@ export default defineComponent({ const handleChange = (e: Event) => { const { composing } = e.target as any; let triggerValue = (e.target as any).value; - compositing.value = !!((e as any).isComposing || composing); + compositing.value = !!((e as any).isComposing && composing); if ((compositing.value && props.lazy) || stateValue.value === triggerValue) return; if (hasMaxLength.value) { diff --git a/components/vc-input/Input.tsx b/components/vc-input/Input.tsx index 84a069c78..9d7d29c5a 100644 --- a/components/vc-input/Input.tsx +++ b/components/vc-input/Input.tsx @@ -93,8 +93,7 @@ export default defineComponent({ const handleChange = (e: ChangeEvent) => { const { value, composing } = e.target as any; // https://github.com/vueComponent/ant-design-vue/issues/2203 - if ((((e as any).isComposing || composing) && props.lazy) || stateValue.value === value) - return; + if (((e as any).isComposing && composing && props.lazy) || stateValue.value === value) return; const newVal = e.target.value; resolveOnChange(inputRef.value, e, triggerChange); setValue(newVal);