From f08a434bc597bae3dd9a70fea0eefcb3c3966c3b Mon Sep 17 00:00:00 2001 From: igrowp <34541195+igrowp@users.noreply.github.com> Date: Fri, 23 Sep 2022 12:29:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20conditionBuilder=20ts=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BF=AE=E6=94=B9=20(#5428)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: wutong25 --- packages/amis-ui/src/components/condition-builder/Field.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/amis-ui/src/components/condition-builder/Field.tsx b/packages/amis-ui/src/components/condition-builder/Field.tsx index ceaa867c7..1c749fb0f 100644 --- a/packages/amis-ui/src/components/condition-builder/Field.tsx +++ b/packages/amis-ui/src/components/condition-builder/Field.tsx @@ -83,7 +83,7 @@ export class ConditionField extends React.Component< } // 选了值,还原options - onPopClose(e: React.MouseEvent, onClose: () => void) { + onPopClose(onClose: () => void) { this.setState({searchText: ''}); onClose(); } @@ -117,14 +117,14 @@ export class ConditionField extends React.Component< options={this.filterOptions(this.props.options)} value={value} onChange={(value: any) => { - this.onPopClose(null, onClose); + this.onPopClose(onClose); onChange(value.name); }} /> ) : ( this.onPopClose(e, onClose)} + onClick={() => this.onPopClose(onClose)} options={this.filterOptions(this.props.options)} value={[value]} option2value={option2value}