Skip to content

Commit

Permalink
fix(grid): fix the key of cell in grid component to rerender correctly (
Browse files Browse the repository at this point in the history
#2068)

Co-authored-by: zhengningning <[email protected]>
  • Loading branch information
SakuraSM and zhengningning authored Sep 11, 2024
1 parent fd4a5ab commit a3df8b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/zent/src/grid/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ class Row<Data> extends PureComponent<IGridRowProps<Data>> {
column: columnIndex,
fixed,
};
const columnKey = column.name || columnIndex;

cells.push(
<Cell
column={column}
data={data}
pos={pos}
columnIndex={columnIndex}
key={columnIndex}
key={columnKey}
prefix={prefix}
/>
);
Expand Down

0 comments on commit a3df8b7

Please sign in to comment.