Added missing fussy search fileds and support for number

This commit is contained in:
Joao Ramos
2024-08-05 19:32:53 +01:00
parent f0d7d7644b
commit 48faee07f6
2 changed files with 15 additions and 7 deletions

View File

@@ -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]);