Skip to content

Commit bbc25ad

Browse files
committed
fix: input trigger twice event
1 parent 89c9e81 commit bbc25ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/input/Input.jsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,14 @@ export default {
157157
}),
158158
ref: this.saveInput,
159159
key: 'ant-input',
160+
onInput: handleChange,
161+
onChange: noop,
160162
};
161163
// vue bug ?
162164
if (inputProps.maxLength === undefined) {
163165
delete inputProps.maxLength;
164166
}
165-
return <input {...inputProps} onInput={handleChange} onChange={noop} />;
167+
return <input {...inputProps} />;
166168
},
167169
clearPasswordValueAttribute() {
168170
// https://github.com/ant-design/ant-design/issues/20541

0 commit comments

Comments
 (0)