diff --git a/docs/examples/DropdownButtonBasic.js b/docs/examples/DropdownButtonBasic.js
index 66fb3ef4de..ea851b88e6 100644
--- a/docs/examples/DropdownButtonBasic.js
+++ b/docs/examples/DropdownButtonBasic.js
@@ -5,7 +5,7 @@ function renderDropdownButton (title, i) {
-
+
diff --git a/src/MenuItem.js b/src/MenuItem.js
index 8c0f7c9f56..d5bdce7a89 100644
--- a/src/MenuItem.js
+++ b/src/MenuItem.js
@@ -9,12 +9,14 @@ const MenuItem = React.createClass({
title: React.PropTypes.string,
target: React.PropTypes.string,
onSelect: React.PropTypes.func,
- eventKey: React.PropTypes.any
+ eventKey: React.PropTypes.any,
+ active: React.PropTypes.bool
},
getDefaultProps() {
return {
- href: '#'
+ href: '#',
+ active: false
};
},
@@ -36,7 +38,8 @@ const MenuItem = React.createClass({
render() {
let classes = {
'dropdown-header': this.props.header,
- 'divider': this.props.divider
+ 'divider': this.props.divider,
+ 'active': this.props.active
};
let children = null;
diff --git a/test/MenuItemSpec.js b/test/MenuItemSpec.js
index 7570060d53..703a1f63d9 100644
--- a/test/MenuItemSpec.js
+++ b/test/MenuItemSpec.js
@@ -18,7 +18,8 @@ describe('MenuItem', function () {
);
@@ -27,6 +28,7 @@ describe('MenuItem', function () {
assert(node.className.match(/\btest-class\b/));
assert.equal(node.getAttribute('href'), null);
assert.equal(node.getAttribute('title'), null);
+ assert.ok(node.className.match(/\bactive\b/));
let anchorNode = ReactTestUtils.findRenderedDOMComponentWithTag(instance, 'a').getDOMNode();
assert.notOk(anchorNode.className.match(/\btest-class\b/));