Merge "refactor: update magic input value"
This commit is contained in:
commit
6e6a6ea46d
@ -441,8 +441,8 @@ class MagicInput extends PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
clearInputValue = () => {
|
clearInputValue = () => {
|
||||||
this.inputRef.current.setState({
|
this.setState({
|
||||||
value: '',
|
inputValue: '',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -547,7 +547,7 @@ class MagicInput extends PureComponent {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { placeholder } = this.props;
|
const { placeholder } = this.props;
|
||||||
const { isFocus } = this.state;
|
const { isFocus, inputValue } = this.state;
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={classnames(
|
className={classnames(
|
||||||
@ -575,6 +575,7 @@ class MagicInput extends PureComponent {
|
|||||||
onFocus={this.handleFocus}
|
onFocus={this.handleFocus}
|
||||||
onPressEnter={this.handleEnter}
|
onPressEnter={this.handleEnter}
|
||||||
onKeyUp={this.handleKeyUp}
|
onKeyUp={this.handleKeyUp}
|
||||||
|
value={inputValue}
|
||||||
/>
|
/>
|
||||||
{this.renderMenu()}
|
{this.renderMenu()}
|
||||||
</Col>
|
</Col>
|
||||||
|
Loading…
Reference in New Issue
Block a user