Fix Each child in a list should have a unique key prop. (#10881)
As title
This commit is contained in:
@ -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={() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user