Reproduction link
https://ant-design.antgroup.com/components/menu-cn#menu-demo-sider-current
Steps to reproduce
- 点击 Navigation Two
- 点击 Submenu
- 再次点击 Submenu
What is expected?
当再次点击 Submenu 后,Navigation Two 被收起了
What is actually happening?
Navigation Two 不应该被收起
| Environment | Info |
| ------------ | ------------ |
| antd | 5.15.2 |
| React | latest |
| System | mac |
| Browser | chrome |
这个问题是上次 #44221 改动导致的
1条答案
按热度按时间dfddblmv1#
另外在 https://stackblitz.com/edit/react-qff6t5?file=demo.tsx 里,展开了
Submenu
后再次展开Submenu 2
,Submenu
不会被收起。这个 openKeys 的逻辑有问题,需要修改