fix: conditionBuilder ts类型报错修改 (#5428)

Co-authored-by: wutong25 <wutong25@baidu.com>
This commit is contained in:
igrowp 2022-09-23 12:29:58 +08:00 committed by GitHub
parent 5b743dd31f
commit f08a434bc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}}
/>
) : (
<ListSelection
multiple={false}
onClick={(e: any) => this.onPopClose(e, onClose)}
onClick={() => this.onPopClose(onClose)}
options={this.filterOptions(this.props.options)}
value={[value]}
option2value={option2value}