Skip to content

Commit

Permalink
Fix duplicate keys on grid resize components (#6056)
Browse files Browse the repository at this point in the history
**Problem:**

Grid resize components don't have `key` props.

**Fix:**

Add them.
  • Loading branch information
ruggi authored and liady committed Dec 13, 2024
1 parent fb60924 commit e3f4e9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions editor/src/components/canvas/controls/grid-controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ export const GridResizing = React.memo((props: GridResizingProps) => {

return (
<GridResizingControl
key={`grid-resizing-control-${dimensionIndex}`}
dimensionIndex={dimensionIndex}
dimension={dimension}
fromPropsAxisValues={props.fromPropsAxisValues}
Expand Down Expand Up @@ -735,6 +736,7 @@ export const GridControls = controlForStrategyMemoized(() => {
{grids.flatMap((grid) => {
return (
<GridResizing
key={`grid-resizing-column-${EP.toString(grid.elementPath)}`}
axisValues={grid.gridTemplateColumns}
fromPropsAxisValues={grid.gridTemplateColumnsFromProps}
containingFrame={grid.frame}
Expand All @@ -746,6 +748,7 @@ export const GridControls = controlForStrategyMemoized(() => {
{grids.flatMap((grid) => {
return (
<GridResizing
key={`grid-resizing-row-${EP.toString(grid.elementPath)}`}
axisValues={grid.gridTemplateRows}
fromPropsAxisValues={grid.gridTemplateRowsFromProps}
containingFrame={grid.frame}
Expand Down

0 comments on commit e3f4e9d

Please sign in to comment.