fix: 搜索框组件通过事件动作给页面变量赋值导致自身值受影响

This commit is contained in:
wutong25 2023-09-06 14:44:53 +08:00
parent 47e297e392
commit 774ad6f3c7

View File

@ -178,9 +178,10 @@ export class SearchBoxRenderer extends React.Component<
this.setState({value: ''});
}
}
setData(value: any) {
this.setState({value});
if (typeof value === 'string') {
this.setState({value});
}
}
render() {