Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Hughen opened this issue Dec 6, 2017 · 7 comments
Closed
Assignees
Labels
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@Hughen
Copy link
Contributor

Hughen commented Dec 6, 2017

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

@afc163
Copy link
Member

afc163 commented Dec 6, 2017

I don't understand, your codepen don't make any sense, sub10 is not existed in Menu keys.

Ant there is no allSubMenuKeys.

@Hughen
Copy link
Contributor Author

Hughen commented Dec 6, 2017

define allSubMenuKeys, just want to said the all SubMenu of Menu, and it's not a property of Menu.
from my demo:

    <Menu
      defaultOpenKeys={['sub10']}
    >
      <SubMenu key="sub1">...</SubMenu>
      <SubMenu key="sub2">...</SubMenu>
    </Menu>

@afc163
Copy link
Member

afc163 commented Dec 6, 2017

Is this a bug report or a feature request?

@Hughen
Copy link
Contributor Author

Hughen commented 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.

@afc163 afc163 added the 🐛 Bug Ant Design Team had proved that this is a bug. label Dec 6, 2017
@afc163 afc163 self-assigned this Dec 6, 2017
@afc163 afc163 closed this as completed in 7d082c1 Dec 17, 2017
@Hughen
Copy link
Contributor Author

Hughen commented Dec 18, 2017

@afc163
from your commit log, and I copy your tips in antd@2.13.11。
I am sorry to tell you, there are still problems, but it's a new bug which can not collasped after expanded.
Maybe you should carefully test, looking forward to your new solution.
menu-collapsed-error

@afc163
Copy link
Member

afc163 commented Dec 18, 2017

@Hughen Could u provide a reproducible steps of your gif?

@Hughen
Copy link
Contributor Author

Hughen commented Dec 18, 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>

afc163 added a commit that referenced this issue Dec 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants