mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-11 17:26:32 +02:00
feat(grid): optimize global search to filter strictly by product name (libelle1) and codein
This commit is contained in:
1 parent
b921f5ad40
commit
4716659c29
1 file changed
+6
@@ -419,6 +419,12 @@ export function HeatmapGrid({ onSelectionChange }: HeatmapGridProps) {
|
||||
getSortedRowModel: getSortedRowModel(),
|
||||
getFilteredRowModel: getFilteredRowModel(),
|
||||
enableRowSelection: true,
|
||||
globalFilterFn: (row, columnId, filterValue) => {
|
||||
const search = String(filterValue).toLowerCase();
|
||||
const libelle = String(row.original.libelle1 || "").toLowerCase();
|
||||
const code = String(row.original.codein || "").toLowerCase();
|
||||
return libelle.includes(search) || code.includes(search);
|
||||
},
|
||||
});
|
||||
|
||||
const { rows: tableRows } = table.getRowModel();
|
||||
|
||||
Reference in new issue
Block a user