Skip to content

Commit

Permalink
fix(taginput): fix when entering Chinese, it will be blocked by the p…
Browse files Browse the repository at this point in the history
…revious label (#2438)

Co-authored-by: Heising <heising@travelconnect.cn>
  • Loading branch information
HaixingOoO and Heising authored Aug 18, 2023
1 parent 13fb59b commit 723acae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down Expand Up @@ -256,7 +256,7 @@ const Input = forwardRefWithStatics(
{showInput && renderInput}
{autoWidth && (
<span ref={inputPreRef} className={`${classPrefix}-input__input-pre`}>
{value || placeholder}
{innerValue || placeholder}
</span>
)}
{suffixContent || limitNumberNode ? (
Expand Down

0 comments on commit 723acae

Please sign in to comment.