From 774ad6f3c7c4a45dfa7f10aa837513ad5fe46cf7 Mon Sep 17 00:00:00 2001 From: wutong25 Date: Wed, 6 Sep 2023 14:44:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=90=9C=E7=B4=A2=E6=A1=86=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=80=9A=E8=BF=87=E4=BA=8B=E4=BB=B6=E5=8A=A8=E4=BD=9C?= =?UTF-8?q?=E7=BB=99=E9=A1=B5=E9=9D=A2=E5=8F=98=E9=87=8F=E8=B5=8B=E5=80=BC?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E8=87=AA=E8=BA=AB=E5=80=BC=E5=8F=97=E5=BD=B1?= =?UTF-8?q?=E5=93=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis/src/renderers/SearchBox.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/amis/src/renderers/SearchBox.tsx b/packages/amis/src/renderers/SearchBox.tsx index 0ff6d8b1b..9d9fe0100 100644 --- a/packages/amis/src/renderers/SearchBox.tsx +++ b/packages/amis/src/renderers/SearchBox.tsx @@ -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() {