feat(grid): optimize global search to filter strictly by product name (libelle1) and codein

This commit is contained in:
Michael committed 2026-02-27 15:00:57 +01:00
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();