Added missing fussy search fileds and support for number
This commit is contained in:
@@ -27,6 +27,10 @@ export function useListSearch<T>(fields: string[][], rows: T[]) {
|
||||
if (typeof value === "string") {
|
||||
return value.toLowerCase().includes(searchText);
|
||||
}
|
||||
|
||||
if (typeof value === "number") {
|
||||
return (value as Number).toString().includes(searchText);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, [fields, rows, text]);
|
||||
|
||||
Reference in New Issue
Block a user