Change name of TabList prop

pull/509/head
Andrew Watkins 2016-11-12 13:01:53 -08:00
parent dbb729e556
commit df76b8a394
2 changed files with 5 additions and 5 deletions

View File

@ -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 (
<div className="kapacitor-rule-section">
<h3 className="rule-section-heading">Values</h3>
<div className="rule-section-body">
<Tabs forceActiveIndex={forcedActiveIndex} onSelect={this.handleChooseTrigger}>
<Tabs initialIndex={initialIndex} onSelect={this.handleChooseTrigger}>
<TabList isKapacitorTabs="true">
{TABS.map(tab => <Tab key={tab}>{tab}</Tab>)}
</TabList>

View File

@ -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,
};
},