feat: introduce virtualized heatmap grid component with client-side filtering, sorting, and optimized Zustand state management.

This commit is contained in:
Michael committed 2026-03-18 20:49:57 +01:00
1 parent 9aca3b8ead
commit aa77025d14
1 file changed
+2 -2
@@ -233,7 +233,7 @@ export function HeatmapGrid({ onSelectionChange }: HeatmapGridProps) {
const selectedIdxs = Object.keys(rowSelection).filter((k) => rowSelection[k]);
const selectedCodeins = selectedIdxs
.map((idx) => rows[parseInt(idx)]?.codein ?? "")
.map((idx) => filteredData[parseInt(idx)]?.codein ?? "")
.filter(Boolean);
// Only update if selection actually changed to avoid re-render loops & console warnings
@@ -245,7 +245,7 @@ export function HeatmapGrid({ onSelectionChange }: HeatmapGridProps) {
// Delay update to next tick to ensure we're out of any render cycles
setTimeout(() => onSelectionChange(selectedCodeins), 0);
}
}, [rowSelection, onSelectionChange, rows]);
}, [rowSelection, onSelectionChange, filteredData]);
const columns = React.useMemo<ColumnDef<ProductRow>[]>(() => [
{