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

[Feature] Nested DropdownMenu #124

Open
TimNZ opened this issue Jul 23, 2016 · 2 comments
Open

[Feature] Nested DropdownMenu #124

TimNZ opened this issue Jul 23, 2016 · 2 comments
Labels

Comments

@TimNZ
Copy link

TimNZ commented Jul 23, 2016

Thanks for your great work here.

I'm trying to replicate the nested menu from http://semantic-ui.com/collections/menu.html
It is the example with the left aligned Wrench icon dropdown and the 'Search Animals' search box.

Since your documentation is currently light, I'm struggling to figure out if nested menus is supported by playing.

This code ends up with 'Hi' menu item having a arrow icon indicating a sub menu, but clicking does nothing. I would expect since DropdownMenu requires explicit active toggling of it, but this doesn't work, nor seems a correct approach anyway.

I've tried nesting a Menu instead of DropdownMenu as well.

       <Menu className="top">
                        <DropdownMenu active={this.state.active} component={iconButton}
                                      onMenuItemClick={this.menuItemClicked.bind(this)}
                                      onClick={this.toggleDropdown.bind(this)}>
                            <MenuItem menuValue="0">First</MenuItem>
                            <MenuItem>Hi
                                <DropdownMenu vertical={true}>
                                    <MenuItem menuValue="1">Second</MenuItem>
                                </DropdownMenu>
                            </MenuItem>

                        </DropdownMenu>
                    </Menu>
@asvetliakov
Copy link
Collaborator

asvetliakov commented Jul 23, 2016

Oh sorry, nested menus are not supported yet.
Currently dropdownmenu is fully controlled component so you need to control active prop for nested menu (similar as for broken nested accordion for example 😄 ) . But probably the markup will be broken in such case anyway.

@asvetliakov asvetliakov changed the title Nested DropdownMenu [Feature] Nested DropdownMenu Jul 23, 2016
@TimNZ
Copy link
Author

TimNZ commented Jul 23, 2016

Ahh. Thanks, no problem. Not even sure why I settled on that particular scenario to test.
Genuinely looking forward to seeing this at feature parity with Semantic since it's such a sweet UI library. If I had any decent UI dev skills I'd help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants