Fix Each child in a list should have a unique key prop. (#10881)

As title
This commit is contained in:
martmull
2025-03-14 12:00:03 +01:00
committed by GitHub
parent 44a11353b4
commit d951a5a099

View File

@ -24,9 +24,9 @@ export const CommandMenuContextChipGroups = ({
if (contextChips.length < 3) { if (contextChips.length < 3) {
return ( return (
<> <>
{contextChips.map((chip) => ( {contextChips.map((chip, index) => (
<CommandMenuContextChip <CommandMenuContextChip
key={chip.text} key={index}
Icons={chip.Icons} Icons={chip.Icons}
text={chip.text} text={chip.text}
onClick={chip.onClick} onClick={chip.onClick}
@ -53,8 +53,9 @@ export const CommandMenuContextChipGroups = ({
} }
dropdownComponents={ dropdownComponents={
<DropdownMenuItemsContainer> <DropdownMenuItemsContainer>
{firstChips.map((chip) => ( {firstChips.map((chip, index) => (
<MenuItem <MenuItem
key={index}
LeftComponent={chip.Icons} LeftComponent={chip.Icons}
text={chip.text} text={chip.text}
onClick={() => { onClick={() => {