File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,13 @@ const includesString: FilterFn<any> = (
6
6
filterValue : string
7
7
) => {
8
8
const search = filterValue . toLowerCase ( )
9
- return Boolean ( row . getValue < string > ( columnId ) ?. toLowerCase ( ) . includes ( search ) )
9
+ return Boolean (
10
+ row
11
+ . getValue < string | null > ( columnId )
12
+ ?. toString ( )
13
+ ?. toLowerCase ( )
14
+ . includes ( search )
15
+ )
10
16
}
11
17
12
18
includesString . autoRemove = ( val : any ) => testFalsey ( val )
@@ -16,7 +22,9 @@ const includesStringSensitive: FilterFn<any> = (
16
22
columnId : string ,
17
23
filterValue : string
18
24
) => {
19
- return Boolean ( row . getValue < string > ( columnId ) ?. includes ( filterValue ) )
25
+ return Boolean (
26
+ row . getValue < string | null > ( columnId ) ?. toString ( ) ?. includes ( filterValue )
27
+ )
20
28
}
21
29
22
30
includesStringSensitive . autoRemove = ( val : any ) => testFalsey ( val )
@@ -27,7 +35,8 @@ const equalsString: FilterFn<any> = (
27
35
filterValue : string
28
36
) => {
29
37
return (
30
- row . getValue < string > ( columnId ) ?. toLowerCase ( ) === filterValue . toLowerCase ( )
38
+ row . getValue < string | null > ( columnId ) ?. toString ( ) ?. toLowerCase ( ) ===
39
+ filterValue ?. toLowerCase ( )
31
40
)
32
41
}
33
42
You can’t perform that action at this time.
0 commit comments