File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -76,15 +76,21 @@ export const getColumnSearchProps = ({
7676 < SearchOutlined style = { { color : filtered ? '#1677ff' : undefined } } />
7777 ) ,
7878 onFilter : ( value , record ) => {
79- const safeValue = value ? value . split ( symbol ) [ 0 ] : '' ;
80- const realValue = trim ( safeValue . toLowerCase ( ) ) ;
79+ const allvalue1 = trim (
80+ ( value ? value . split ( symbol ) [ 0 ] : '' ) ?. toLowerCase ( ) ,
81+ ) ;
82+ const allvalue2 = trim (
83+ ( value ? value . split ( symbol ) [ 1 ] : '' ) ?. toLowerCase ( ) ,
84+ ) ;
8185
8286 return arraySearch
8387 ? record [ dataIndex ] &&
84- record [ dataIndex ] . some (
88+ record [ dataIndex ] ? .some (
8589 ( item ) =>
86- ( item . key && item . key . toLowerCase ( ) . includes ( realValue ) ) ||
87- ( item . value && item . value . toLowerCase ( ) . includes ( realValue ) ) ,
90+ item . key &&
91+ item . key . toLowerCase ( ) . includes ( allvalue1 ) &&
92+ item . value &&
93+ item . value . toLowerCase ( ) . includes ( allvalue2 ) ,
8894 )
8995 : record [ dataIndex ] &&
9096 record [ dataIndex ]
You can’t perform that action at this time.
0 commit comments