-
-
Notifications
You must be signed in to change notification settings - Fork 262
Closed
Description
I have got a SubMenu like this:
<div>
<Menu mode="horizontal" id="nav">
<SubMenu title="John">
<MenuItemGroup key="actions" title="Actions">
<Menu.Item key="createCompany">
<a href="#" >Create Company</a>
</Menu.Item>
<Menu.Item key="signOut">
<a href="#" >Sign Out</a>
</Menu.Item>
</MenuItemGroup>
</SubMenu>
</Menu>
</div>
For some reason it triggers the componentWillReceiveProps immediately after it first render, and openKeys is undefined in nextProps so it passes on causing an error in isOpen in SubMenu

I spent a couple of hours and still cannot reproduce in it online. Adding a guard clause against undefined openKeys (and for selectedKeys, just in case) should solve the issue.
I will submit a PR now.
Metadata
Metadata
Assignees
Labels
No labels