update search datatable

This commit is contained in:
Joseph 2025-03-14 15:16:04 +07:00
parent e174146678
commit d1f889c996
1 changed files with 1 additions and 6 deletions

View File

@ -250,12 +250,7 @@ export const DataTableAll = ({
if (query !== '') { if (query !== '') {
setTData( setTData(
data.filter((obj) => data.filter((obj) =>
Object.values(obj).some( Object.values(obj)?.find((c: any) => c.toString().normalize('NFC').toLowerCase().includes(query.normalize('NFC').toLowerCase())))
(value: any) =>
value !== null &&
value.toString().toLowerCase().includes(query.toLowerCase()),
),
),
) )
} else { } else {
if (pagination) { if (pagination) {