From df76b8a39481786a1ebdbd64f3455f2a16df7e25 Mon Sep 17 00:00:00 2001 From: Andrew Watkins Date: Sat, 12 Nov 2016 13:01:53 -0800 Subject: [PATCH] Change name of TabList prop --- ui/src/kapacitor/components/ValuesSection.js | 4 ++-- ui/src/shared/components/Tabs.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/src/kapacitor/components/ValuesSection.js b/ui/src/kapacitor/components/ValuesSection.js index 8e639f79a..be9e9dac5 100644 --- a/ui/src/kapacitor/components/ValuesSection.js +++ b/ui/src/kapacitor/components/ValuesSection.js @@ -17,13 +17,13 @@ export const ValuesSection = React.createClass({ render() { const {rule, query} = this.props; - const forcedActiveIndex = TABS.indexOf(_.startCase(rule.trigger)); + const initialIndex = TABS.indexOf(_.startCase(rule.trigger)); return (

Values

- + {TABS.map(tab => {tab})} diff --git a/ui/src/shared/components/Tabs.js b/ui/src/shared/components/Tabs.js index ae320088f..7d451d865 100644 --- a/ui/src/shared/components/Tabs.js +++ b/ui/src/shared/components/Tabs.js @@ -90,7 +90,7 @@ export const Tabs = React.createClass({ onSelect: func, tabContentsClass: string, tabsClass: string, - forceActiveIndex: number, + initialIndex: number, }, getDefaultProps() { @@ -101,10 +101,10 @@ export const Tabs = React.createClass({ }, getInitialState() { - // forceActiveIndex allows the user to enable a Tab and TabPanel + // initialIndex allows the user to enable a Tab and TabPanel // other than 0 on initial render. return { - activeIndex: this.props.forceActiveIndex ? this.props.forceActiveIndex : 0, + activeIndex: this.props.initialIndex || 0, }; },