Skip to content

Commit

Permalink
fix(AutoComplete): #7380 and #7276 (#7391)
Browse files Browse the repository at this point in the history
  • Loading branch information
aShu-guo authored Apr 19, 2024
1 parent 4815ee6 commit 162d1fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/input/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 1 addition & 2 deletions components/vc-input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 162d1fc

Please sign in to comment.