question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

collapsed menu will not working, when defaultOpenKeys not in all SubMenu keys

See original GitHub issue

Version

2.13.11

Environment

All browsers

Reproduction link

https://codepen.io/Hughen/pen/LOvKWL

Steps to reproduce

    defaultOpenKeys=['sub10']
    allSubMenuKeys=['sub1', 'sub2']

   // defaultOpenKeys ∩ allSubMenuKeys = 0

What is expected?

every submenu will be expanded, the point hover on it.

What is actually happening?

the menu defaultOpenKeys can not find anything from Menu.SubMenu keys, any submenu is not appeared when sider bar has been collapsed

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Hughencommented, Dec 6, 2017

It’s a bug. ex: image my point hover on “Navigation One”, but there is disappearing submenu. please note my demo code, and click fold-unfold button, hover submenu, you will be known what I said.

0reactions
Hughencommented, Dec 19, 2017

@afc163 base on your commit, gif demo code:

<Menu
  mode="inline"
  theme="dark"
>
  <SubMenu
    title="Main Menu"
    key="main"
  >
    <Menu.Item key="s1">
      <a href="#">Sub 1</a>
    </Menu.Item>
    <Menu.Item key="s2">
      <a href="#">Sub 2</a>
    </Menu.Item>
  </SubMenu>
</Menu>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with reseting openKeys in Ant Design Menu within ...
I have antd Menu inside collapsible Sider. I've set default open keys for one of Submenus and they should open one at a...
Read more >
Menu - Ant Design
Click the menu and you will see that all the other menus gets collapsed to keep the entire menu compact.
Read more >
Menu - Ant Design
Click the menu and you will see that all the other menus gets collapsed to keep the entire menu compact. expand code.
Read more >
How to use Ant Design Menu Component - YouTube
antd #reactjs # menu #navigation This video focuses on- How to use Ant Design Menu Component in ReactJS- How to create sub menu...
Read more >
rc-menu@9.8.1
eventKey?: string;. Internal filled key. Do not set it directly ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found