Closed
Description
Package
@carbon/react
Browser
Chrome
Package version
V1.36
React version
v18.2
Description
When trying to render MenuItemSelectable
Component inside a Menu
component, i get the following warning:
Warning: Failed prop type: Invalid prop `renderIcon` supplied to `ForwardRef(MenuItem)`, expected one of type [function, object].
at MenuItem (https://6r3y3j.csb.app/node_modules/@carbon/react/es/components/Menu/MenuItem.js:42:23)
at MenuItemSelectable (https://6r3y3j.csb.app/node_modules/@carbon/react/es/components/Menu/MenuItem.js:209:25)
at ul
at li
at MenuItemGroup (https://6r3y3j.csb.app/node_modules/@carbon/react/es/components/Menu/MenuItem.js:273:24)
at ul
at Menu (https://6r3y3j.csb.app/node_modules/@carbon/react/es/components/Menu/Menu.js:28:18)
at div
at App
Reproduction/example
https://codesandbox.io/s/romantic-ace-6r3y3j?file=/index.js:240-244
Steps to reproduce
- Place
MenuItemSelectable
inside a Menu component - Open the console to see the warning
Suggested Severity
Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.
Application/PAL
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
- I checked the current issues for duplicate problems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done