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) {
return (
<>
{contextChips.map((chip) => (
{contextChips.map((chip, index) => (
<CommandMenuContextChip
key={chip.text}
key={index}
Icons={chip.Icons}
text={chip.text}
onClick={chip.onClick}
@ -53,8 +53,9 @@ export const CommandMenuContextChipGroups = ({
}
dropdownComponents={
<DropdownMenuItemsContainer>
{firstChips.map((chip) => (
{firstChips.map((chip, index) => (
<MenuItem
key={index}
LeftComponent={chip.Icons}
text={chip.text}
onClick={() => {