Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/PopoverMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ function PopoverMenu({
{enteredSubMenuIndexes.length > 0 && renderBackButtonItem()}
{currentMenuItems.map((item, menuIndex) => (
<FocusableMenuItem
key={item.text}
// eslint-disable-next-line react/no-array-index-key
key={`${item.text}_${menuIndex}`}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ishpaul777 , do you think we should disable the rule here? We do the same at one other place:

// eslint-disable-next-line react/no-array-index-key
key={`${text}${i}`}

If no then we can try using item.label instead, what do you think ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think disabling rule should be enough 👍

icon={item.icon}
iconWidth={item.iconWidth}
iconHeight={item.iconHeight}
Expand Down