-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
DropdownButtons need an overhaul. #526
Comments
I'm not sure if there's a bug for this yet, but nesting dropdowns results in really broken menus. |
Thanks @manveru I will take that into consideration. |
For those of you following this issue, I have started on this though I don't have anything of note to push yet. I should get a little bit more time this week to work on this issue. |
@manveru Support for sub menus was dropped in Bootstrap 3 so I don't think we will be including it here. So, you'll need to have your own custom component to do this. There is a good solution proposed on StackOverflow. I am thinking about allowing for a |
createChainedFunction cleanup: From @jtenner on gitter |
I've edited the first message:
|
Can you please clarify if this is taking into account the root cause of #368 ? I currently have the following React render call for my Nav component: render: function () {
var projectMenuItemLinks = this.state.projects.map(function(project, i) {
return (
<MenuItemLink
key={i}
eventKey={'\'' + (i + 1) + '\''}
to='validate'
params={{projectId: project.id}}
>
{project.name}
</MenuItemLink>
);
});
return (
<Navbar brand='My Project' inverse toggleNavKey={0}>
<Nav right eventKey={0}> {}
<NavItemLink eventKey={1} to='home' params={{}}>Home</NavItemLink>
<DropdownButton eventKey={2} title='Projects'>
{projectMenuItemLinks}
</DropdownButton>
<NavItemLink eventKey={3} to='leaderboard' params={{}}>Leaderboard</NavItemLink>
<NavItemLink eventKey={4} to='profile' params={{}}>Profile</NavItemLink>
</Nav>
</Navbar>
);
} This is using When selecting one of the links from the dropdown, I would like the dropdown to close (in addition to the page navigation). Do/will I need to specify an I was also taking a look at https://rackt.github.io/react-router/#Transition, but it's not obvious to me how to integrate it with |
@MatthewHerbst yes the changes in the dropdown-revisited branch which is PR #1096 should fix the underlying problem. Though we are investigating an alternative approach that will be easier to work with. So, once #1096 is merged we'll need to update the react-router-bootstrap project to fix the problem you're describing. |
@mtscout6 awesome, thanks for the update! |
We're going to have some problems with react-bootstrap/react-bootstrap#526
I know there are a lot of problems with the DropdownButton, which I hope to remedy soon. I know I'll have some time to work on them next week, but I can't guarantee a delivery date. I'm mainly creating this issue to aggregate all the dropdown issues in one place.
Notes as per W3C WAI-ARIA Spec:
The menu button itself has a role of button.It is a button so not needed.Notes per reported issues:
Allow a Dropdown within a Dropdown. Should resolve DropdownStateMixin: return early if the target has been detached #398Not supported in Bootstrap 3. See: WIP: Bootstrap 3 twbs/bootstrap#6342Navbar
. Should resolve Navbar dropdowns in collapsed state #421, and Can't split Navbar elements #700DropdownMenu
. Should resolve onClick, onSelect ignored for DropdownButton #470 (Still in discussion)onSelect
event signatures per Change calls to e.preventDefault() to allow onClick and onSelect calls to override #419. This will not likely land in the first release of the dropdown re-write. Sorry @mathieumg it will come at some point though.MenuItem
hasdisabled
prop. Resolves Disable MenuItem #246, and [added] property disabled on MenuItem #606download
,media
,ping
,rel
,type
etc (applicable for<a>
) down toanchor
Specifying props for nested anchor components #629Existing features that should still be supported:
pullRight
dropup
noCaret
onClick
event handlerbsSize
bsStyle
Issues I Need to dig into more to understand completely:
twbs/bootstrap#15263 - for reference. (Applies some Aria roles I hadn't considered up till now)
The text was updated successfully, but these errors were encountered: