From 723acaef5dffcbcb4f70721120427d84f8651ff6 Mon Sep 17 00:00:00 2001 From: Zong-Ke Zhang <65376724+Zzongke@users.noreply.github.com> Date: Fri, 18 Aug 2023 17:24:38 +0800 Subject: [PATCH] fix(taginput): fix when entering Chinese, it will be blocked by the previous label (#2438) Co-authored-by: Heising --- src/input/Input.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input/Input.tsx b/src/input/Input.tsx index 734703261..18df1b071 100644 --- a/src/input/Input.tsx +++ b/src/input/Input.tsx @@ -168,7 +168,7 @@ const Input = forwardRefWithStatics( updateInputWidth(); }); // eslint-disable-next-line - }, [autoWidth, value, placeholder, inputRef]); + }, [autoWidth, value, placeholder, inputRef, composingValue]); // 当元素默认为 display: none 状态,无法提前准确计算宽度,因此需要监听元素宽度变化。比如:Tabs 场景切换。 useEffect(() => { @@ -256,7 +256,7 @@ const Input = forwardRefWithStatics( {showInput && renderInput} {autoWidth && ( - {value || placeholder} + {innerValue || placeholder} )} {suffixContent || limitNumberNode ? (