Skip to content

Commit 18dddbb

Browse files
author
jeromeZhang
committed
fix: filterOption add type
1 parent 91348ac commit 18dddbb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/easy-select/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ class EasySelect extends React.Component<any, any> {
8383
showSearch={showSearch} // 默认支持查询
8484
style={{ minWidth: 120 }} // todo: 暂时样式,有待商榷
8585
onSearch={ servise && !filterLocal ? this.onSearch : null }
86-
filterOption={ !filterLocal ? null : (input, option) =>
86+
filterOption={ !filterLocal ? null : (input: any, option: any) =>
8787
// 兼容数字和字符串等模糊查询
88-
option.props?.children?.toString().toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
89-
option.props?.value?.toString().toLowerCase().indexOf(input.toLowerCase()) >= 0
88+
option.props.children.toString().toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
89+
option.props.value.toString().toLowerCase().indexOf(input.toLowerCase()) >= 0
9090
}
9191
onPopupScroll={this.companyScroll}
9292
{ ...others }

0 commit comments

Comments
 (0)