From 277e808c826ecdd543d92f1d83a79ae3aec83a51 Mon Sep 17 00:00:00 2001 From: Jimmy Jia Date: Wed, 12 Aug 2015 16:14:37 -0400 Subject: [PATCH 1/3] Fix mapping TabPane title --- src/TabbedArea.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/TabbedArea.js b/src/TabbedArea.js index b898f01d8a..0e48b96d0d 100644 --- a/src/TabbedArea.js +++ b/src/TabbedArea.js @@ -8,17 +8,17 @@ const TabbedArea = React.createClass({ componentDidMount() { deprecationWarning('TabbedArea', 'Tabs', 'https://github.com/react-bootstrap/react-bootstrap/pull/1091'); }, + render() { - let {children, ...props} = this.props; - let tabTitles = []; + const {children, ...props} = this.props; - tabTitles = ValidComponentChildren.map(function(child) { - let {tab, ...others} = child.props; - tabTitles.push(); + const tabs = ValidComponentChildren.map(children, function (child) { + const {tab: title, ...others} = child.props; + return ; }); return ( - {tabTitles} + {tabs} ); } }); From a9c24b7b1f43c8e8c700b8606c2d4400db8d23fc Mon Sep 17 00:00:00 2001 From: Jimmy Jia Date: Wed, 12 Aug 2015 16:27:21 -0400 Subject: [PATCH 2/3] Ensure deprecation warnings show up on server --- src/TabPane.js | 8 ++++++-- src/TabbedArea.js | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/TabPane.js b/src/TabPane.js index aa5fce8868..4ea083b84f 100644 --- a/src/TabPane.js +++ b/src/TabPane.js @@ -3,9 +3,13 @@ import deprecationWarning from './utils/deprecationWarning'; import Tab from './Tab'; const TabPane = React.createClass({ - componentDidMount() { - deprecationWarning('TabPane', 'Tab', 'https://github.com/react-bootstrap/react-bootstrap/pull/1091'); + componentWillMount() { + deprecationWarning( + 'TabPane', 'Tab', + 'https://github.com/react-bootstrap/react-bootstrap/pull/1091' + ); }, + render() { return ( diff --git a/src/TabbedArea.js b/src/TabbedArea.js index 0e48b96d0d..3856b6fb35 100644 --- a/src/TabbedArea.js +++ b/src/TabbedArea.js @@ -5,8 +5,11 @@ import ValidComponentChildren from './utils/ValidComponentChildren'; import deprecationWarning from './utils/deprecationWarning'; const TabbedArea = React.createClass({ - componentDidMount() { - deprecationWarning('TabbedArea', 'Tabs', 'https://github.com/react-bootstrap/react-bootstrap/pull/1091'); + componentWillMount() { + deprecationWarning( + 'TabbedArea', 'Tabs', + 'https://github.com/react-bootstrap/react-bootstrap/pull/1091' + ); }, render() { From 5aefb8b420441d1ca4e8d764cf31284cbd18d080 Mon Sep 17 00:00:00 2001 From: Jimmy Jia Date: Wed, 12 Aug 2015 16:43:12 -0400 Subject: [PATCH 3/3] Fix names of tab components in documentation --- docs/src/ComponentsPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/ComponentsPage.js b/docs/src/ComponentsPage.js index bf995285e4..c0a60d00a4 100644 --- a/docs/src/ComponentsPage.js +++ b/docs/src/ComponentsPage.js @@ -513,7 +513,7 @@ const ComponentsPage = React.createClass({ {/* Tabbed Areas */}
-

Togglable tabs TabbedArea, TabPane

+

Togglable tabs Tabs, Tab

Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.