ebayui-core-react icon indicating copy to clipboard operation
ebayui-core-react copied to clipboard

ebay-menu-button: labelWithPrefixAndIcon causes key warnings

Open mikehobi opened this issue 1 year ago • 1 comments

Hello!

When I'm using <EbayMenuButton>, with prefixLabel and text, I get key warnings in the dev console:

browser-init.tsx:11 Warning: Each child in a list should have a unique "key" prop.

Check the render method of `EbayMenuButton`. See https://fb.me/react-warning-keys for more information.
    in span (created by EbayMenuButton)
    in EbayMenuButton (created by InventoryFilter)
    in InventoryFilter (created by InventoryGrid)
    in section (created by InventoryGrid)
    in div (created by InventoryGrid)
    in InventoryGrid (created by MainPage)
    in div (created by ModuleContainer)
    in ModuleContainer (created by MainPage)
    in section (created by MainPage)
    in MainPage
browser-init.tsx:11 Warning: Each child in a list should have a unique "key" prop. See https://fb.me/react-warning-keys for more information.
    in span (created by EbayButtonText)
    in EbayButtonText (created by EbayButtonExpand)
    in span (created by EbayButtonCell)
    in EbayButtonCell (created by EbayButtonExpand)
    in EbayButtonExpand (created by EbayButton)
    in button (created by EbayButton)
    in EbayButton (created by EbayButton)
    in EbayButton (created by EbayMenuButton)
    in span (created by EbayMenuButton)
    in EbayMenuButton (created by InventoryFilter)
    in InventoryFilter (created by InventoryGrid)
    in section (created by InventoryGrid)
    in div (created by InventoryGrid)
    in InventoryGrid (created by MainPage)
    in div (created by ModuleContainer)
    in ModuleContainer (created by MainPage)
    in section (created by MainPage)
    in MainPage

I've narrowed it down to the labelWithPrefixAndIcon function withing ebay-menu-button/menu-button.tsx

Versions

"react": "^16.12.0" "@ebay/ui-core-react": "^6.2.1"

mikehobi avatar Jun 26 '24 21:06 mikehobi

thanks we'll take a look!

darkwebdev avatar Jul 10 '24 16:07 darkwebdev

Not seeing in the latest version.

HenriqueLimas avatar May 06 '25 18:05 HenriqueLimas