Reproduction link
Steps to reproduce
Create a MenuItem array, assign title property to all top level items, then some add children, some doesn't add children.
What is expected?
Menu item title should show a string when mouse hover.
What is actually happening?
It only shows when there's no children
| Environment | Info |
| ------------ | ------------ |
| antd | 5.16.5 |
| React | 4.4.4 |
| System | Win11 |
| Browser | Edge & Chrome |
https://codesandbox.io/p/sandbox/menu-item-title-6glrvk?file=%2Fsrc%2FApp.tsx
Above example will show details.
5条答案
按热度按时间pgky5nke1#
我来看看😊
bweufnob2#
Combining the document for review, it appears that this feature has not yet been implemented. When a "child" exists, what is actually rendered is not a "MenuItem" but a "SubMenu", and the "SubMenu" does not have a "title" attribute.
xhv8bpkk3#
Title is very important for collapsed menu items.
tvokkenx4#
@li-jia-nan 哥,这个需要做不
jjhzyzn05#
@li-jia-nan 哥,这个需要做不
感觉可以做,但是我拿不准,问问大佬 @zombieJ@MadCcc