forked from react-bootstrap/react-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[added] property disabled on MenuItem
- Loading branch information
Showing
6 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
function onSelectAlert(eventKey, href, target) { | ||
alert('Alert from menu item.\neventKey: "' + eventKey + '"\nhref: "' + href + '"'); | ||
} | ||
|
||
function preventDefault() {} | ||
|
||
const MenuItems = ( | ||
<div className="clearfix"> | ||
<ul className="dropdown-menu open"> | ||
<MenuItem header>Header</MenuItem> | ||
<MenuItem onSelect={preventDefault}>link</MenuItem> | ||
<MenuItem divider/> | ||
<MenuItem header>Header</MenuItem> | ||
<MenuItem onSelect={preventDefault}>link</MenuItem> | ||
<MenuItem disabled>disabled</MenuItem> | ||
<MenuItem title="See? I have a title." onSelect={preventDefault}> | ||
link with title | ||
</MenuItem> | ||
<MenuItem eventKey={1} href="#someHref" onSelect={onSelectAlert}> | ||
link that alerts | ||
</MenuItem> | ||
</ul> | ||
</div> | ||
); | ||
|
||
React.render(MenuItems, mountNode); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters