mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
console: add missing key to component map in CardedTable
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9712 GitOrigin-RevId: 531e2cfae8568326be4d5486728181c64fa82e31
This commit is contained in:
parent
9eb1097957
commit
d61d523f77
@ -261,7 +261,7 @@ export const ReactTableWrapper: React.VFC<ReactTableWrapperProps> = ({
|
||||
|
||||
return (
|
||||
<CardedTable.TableBodyCell
|
||||
key={i}
|
||||
key={`${row.id}-${i}`}
|
||||
data-testid={`@table-cell-${row.id}-${i}`}
|
||||
style={{ maxWidth: '20ch' }}
|
||||
>
|
||||
|
@ -107,12 +107,16 @@ const Body = ({ data, showActionCell = false }: BodyProps) => {
|
||||
<TableBody>
|
||||
{data.map((row, rowIndex) => {
|
||||
return (
|
||||
<TableBodyRow>
|
||||
{row.map((cell, index) => {
|
||||
if (showActionCell && index + 1 === row.length) {
|
||||
return <TableBodyActionCell>{cell}</TableBodyActionCell>;
|
||||
<TableBodyRow key={rowIndex}>
|
||||
{row.map((cell, cellIndex) => {
|
||||
if (showActionCell && cellIndex + 1 === row.length) {
|
||||
return (
|
||||
<TableBodyActionCell key={cellIndex}>
|
||||
{cell}
|
||||
</TableBodyActionCell>
|
||||
);
|
||||
}
|
||||
return <TableBodyCell>{cell}</TableBodyCell>;
|
||||
return <TableBodyCell key={cellIndex}>{cell}</TableBodyCell>;
|
||||
})}
|
||||
</TableBodyRow>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user