diff --git a/components/input/Input.tsx b/components/input/Input.tsx index e00382a016..10106e1877 100644 --- a/components/input/Input.tsx +++ b/components/input/Input.tsx @@ -142,9 +142,10 @@ class Input extends React.Component { setValue( value: string, e: React.ChangeEvent | React.MouseEvent, + callback?: () => void, ) { if (!('value' in this.props)) { - this.setState({ value }); + this.setState({ value }, callback); } const { onChange } = this.props; if (onChange) { @@ -167,7 +168,9 @@ class Input extends React.Component { } handleReset = (e: React.MouseEvent) => { - this.setValue('', e); + this.setValue('', e, () => { + this.focus(); + }); }; handleChange = (e: React.ChangeEvent) => {