Using Cascader as menu item label is not working
See original GitHub issueReproduction link
Steps to reproduce
Created a custom component for cascader which takes menu item name/lable as a prop Add that component in the menu item list for the key label
What is expected?
when I hover over the menu item or click on the menu item, I should see a cascader component
What is actually happening?
Gettign the below error
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it’s defined in, or you might have mixed up default and named imports. Check the render method of Trigger2
.
Environment | Info |
---|---|
antd | 5.0.6 |
React | 18.2.0 |
System | Windows 10 |
Browser | Chrome |
Issue Analytics
- State:
- Created 9 months ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Non-cascade type menubar items not working on Tkinter ...
I've come across what I think may be a bug where whenever I try to make a menubar ( Menu ) in tkinter...
Read more >Cascader
When selecting from a large data set, with multi-stage classification separated for easy selection. Chooses cascade items in one float layer for better...
Read more >TkDocs Tutorial - Menus
Both have a label option to specify the text to display for the item. Submenus. We've already seen cascade menu items used to...
Read more >60704 – Long menu item labels cut off
Bug 60704 - Long menu item labels cut off ... It's SWT. We have a work around for this bug in Windows that...
Read more >Don`t show the window menu
Gomez, In the Object Navigator, go to the 'Property pallette' for the form. Under the 'Functional' section there is a property called 'Menu...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
However, it is a bad practice to use Cascader in a Menu Item. Don’t try it.
https://codesandbox.io/s/top-navigation-antd-5-0-7-forked-6dg3o9?file=/demo.js