diff --git a/src/TabPane.js b/src/TabPane.js index bd41a6cf9e..3e36db3542 100644 --- a/src/TabPane.js +++ b/src/TabPane.js @@ -78,7 +78,11 @@ const TabPane = React.createClass({ }; return ( -
+
{this.props.children}
); diff --git a/src/TabbedArea.js b/src/TabbedArea.js index ee079244bd..fe51a57bf3 100644 --- a/src/TabbedArea.js +++ b/src/TabbedArea.js @@ -5,6 +5,9 @@ import ValidComponentChildren from './utils/ValidComponentChildren'; import Nav from './Nav'; import NavItem from './NavItem'; +let panelId = (props, child) => child.props.id ? child.props.id : props.id && (props.id + '___panel___' + child.props.eventKey); +let tabId = (props, child) => child.props.id ? child.props.id + '___tab' : props.id && (props.id + '___tab___' + child.props.eventKey); + function getDefaultActiveKeyFromChildren(children) { let defaultActiveKey; @@ -61,6 +64,8 @@ const TabbedArea = React.createClass({ }, render() { + let { id, ...props } = this.props; // eslint-disable-line object-shorthand + let activeKey = this.props.activeKey != null ? this.props.activeKey : this.state.activeKey; @@ -69,7 +74,7 @@ const TabbedArea = React.createClass({ } let nav = ( -