+
{items}
);
@@ -62,7 +66,8 @@ class ListGroup extends React.Component {
}
ListGroup.propTypes = {
- className: React.PropTypes.string
+ className: React.PropTypes.string,
+ id: React.PropTypes.string
};
export default ListGroup;
diff --git a/test/ListGroupSpec.js b/test/ListGroupSpec.js
index e28c64b04a..cc0684f834 100644
--- a/test/ListGroupSpec.js
+++ b/test/ListGroupSpec.js
@@ -136,4 +136,15 @@ describe('ListGroup', function () {
assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group'));
});
+ it('Should support an element id through "id" prop', function () {
+ let instance = ReactTestUtils.renderIntoDocument(
+
+ Child
+
+ );
+ assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group'));
+ assert.equal(React.findDOMNode(instance).nodeName, 'UL');
+ assert.equal(React.findDOMNode(instance).id, 'testItem');
+ });
+
});