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.

Menu defaultOpenKeys & defaultSelectedKeys not working with multiple children

See original GitHub issue

Sorry, only speak English.

When using the Menu component, with the mode ‘inline’, the defaultOpenKeys doesn’t work.

The example, http://ant.design/components/menu/#demo-sider, doesn’t work when doing it locally, even when exactly copying the example.

Cheers

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
lyuehhcommented, Feb 18, 2016

补充一下,用 react-css-modules 处理过的也不行,比如

CSSModules(XXX, style)  // XXX 包含 menu,用到了 defaultOpenKeys,那 defaultOpenKeys 就不生效

给后来的提个醒…

0reactions
lock[bot]commented, May 3, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

on change of defaultOpenKeys values does not rer-ender ...
I've just tried with openKeys and and handle onOpenChange to set new openkeys into submenu state it's fine:
Read more >
Menu - Ant Design
Ant Design offers two navigation options: top and side. ... Menu needs to collect its node structure, so its children should be Menu.*...
Read more >
Menu.Item - Ant Design
An enterprise-class UI design language and React-based implementation with a set of high-quality React components, one of best React UI library for ...
Read more >
ReactJS UI Ant Design Menu Component
ReactJS UI Ant Design Menu Component ; defaultOpenKeys: It is used to denote the array with the keys of the default opened sub-menus....
Read more >
Menu - Ant Design
Side navigation provides the Multi-level structure of the website. More layouts with navigation: layout. Examples. Navigation One; Navigation Two.
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