diff --git a/src/components/MagicInput/index.jsx b/src/components/MagicInput/index.jsx index 7e88042e..59eedd81 100644 --- a/src/components/MagicInput/index.jsx +++ b/src/components/MagicInput/index.jsx @@ -441,8 +441,8 @@ class MagicInput extends PureComponent { }; clearInputValue = () => { - this.inputRef.current.setState({ - value: '', + this.setState({ + inputValue: '', }); }; @@ -547,7 +547,7 @@ class MagicInput extends PureComponent { render() { const { placeholder } = this.props; - const { isFocus } = this.state; + const { isFocus, inputValue } = this.state; return (
{this.renderMenu()}