mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-11 17:26:32 +02:00
feat: introduce HeatmapGrid component for virtualized product data display with gamme selection and performance optimizations.
This commit is contained in:
1 parent
d75454dd56
commit
38955ab02a
1 file changed
+4
-1
@@ -119,11 +119,13 @@ interface VirtualRowProps {
|
|||||||
row: Row<ProductRow>;
|
row: Row<ProductRow>;
|
||||||
rowHeight: number;
|
rowHeight: number;
|
||||||
isSelected: boolean;
|
isSelected: boolean;
|
||||||
|
columnVisibility: Record<string, boolean>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const GridRow = React.memo(({ virtualRow, row, rowHeight, isSelected }: VirtualRowProps) => {
|
const GridRow = React.memo(({ virtualRow, row, rowHeight, isSelected, columnVisibility }: VirtualRowProps) => {
|
||||||
// Uniquement la ligne concernée écoute son propre changement pour l'effet visuel
|
// Uniquement la ligne concernée écoute son propre changement pour l'effet visuel
|
||||||
const effectiveGamme = useGridStore((s) => s.draftChanges[row.original.codein] ?? row.original.codeGamme);
|
const effectiveGamme = useGridStore((s) => s.draftChanges[row.original.codein] ?? row.original.codeGamme);
|
||||||
|
void columnVisibility; // Force re-render via React.memo when visibility changes
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<tr
|
<tr
|
||||||
@@ -598,6 +600,7 @@ export function HeatmapGrid({ onSelectionChange }: HeatmapGridProps) {
|
|||||||
row={row}
|
row={row}
|
||||||
rowHeight={rowHeight}
|
rowHeight={rowHeight}
|
||||||
isSelected={isSelected}
|
isSelected={isSelected}
|
||||||
|
columnVisibility={columnVisibility}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user