perf: isolate grid interaction renders
This commit is contained in:
1 parent
ab012b4a32
commit
556179deb5
6 files changed
+434
-140
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import type { SectionGridPlacement } from "./use-grid-layout-actions";
|
||||
|
||||
export interface DndGridEntryProps {
|
||||
sectionId: string;
|
||||
placement: SectionGridPlacement;
|
||||
label: string;
|
||||
columnCount: number;
|
||||
maxRowCount: number | null;
|
||||
isActive: boolean;
|
||||
}
|
||||
|
||||
export const areDndGridEntryPropsEqual = (previous: DndGridEntryProps, next: DndGridEntryProps) =>
|
||||
previous.sectionId === next.sectionId &&
|
||||
previous.label === next.label &&
|
||||
previous.columnCount === next.columnCount &&
|
||||
previous.maxRowCount === next.maxRowCount &&
|
||||
previous.isActive === next.isActive &&
|
||||
previous.placement.id === next.placement.id &&
|
||||
previous.placement.type === next.placement.type &&
|
||||
previous.placement.x === next.placement.x &&
|
||||
previous.placement.y === next.placement.y &&
|
||||
previous.placement.w === next.placement.w &&
|
||||
previous.placement.h === next.placement.h &&
|
||||
previous.placement.minW === next.placement.minW &&
|
||||
previous.placement.minH === next.placement.minH;
|
||||
Reference in new issue
Block a user