Browse Source

Move key to the toplevel child hierarchy elem

Got the complaint that `each child needs to have unique key` (Firefox) because the key was not on the child, but on a nested item.
testing
Daniel Karzel 3 years ago
parent
commit
cfccd04350
No known key found for this signature in database GPG Key ID: 30C3FC2E438ADB6E
  1. 3
      frontend/src/components/cfdtables/CfdTable.tsx

3
frontend/src/components/cfdtables/CfdTable.tsx

@ -180,9 +180,8 @@ export function CfdTable(
Header: "Action", Header: "Action",
accessor: ({ actions, order_id }) => { accessor: ({ actions, order_id }) => {
const actionIcons = actions.map((action) => { const actionIcons = actions.map((action) => {
return (<Tooltip label={action}> return (<Tooltip label={action} key={action}>
<IconButton <IconButton
key={action}
colorScheme={colorSchemaForAction(action)} colorScheme={colorSchemaForAction(action)}
aria-label={action} aria-label={action}
icon={iconForAction(action)} icon={iconForAction(action)}

Loading…
Cancel
Save