Skip to content

Commit 3809b2c

Browse files
authored
fix: fix pinyin input (#14)
1 parent 48bc563 commit 3809b2c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Input.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ const Input = forwardRef<InputRef, InputProps>((props, ref) => {
7575
}, [disabled]);
7676

7777
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
78-
setValue(e.target.value);
78+
if (props.value === undefined) {
79+
setValue(e.target.value);
80+
}
7981
if (inputRef.current) {
8082
resolveOnChange(inputRef.current, e, onChange);
8183
}

0 commit comments

Comments
 (0)