Fixed react-bootstrap tabs warnings

We can't use our own "id" values here, since react-bootstrap requires internal consistency
between tab containers and tab panes through its own auto-generated identifiers
This commit is contained in:
Ingo Schommer 2016-09-14 15:07:10 +12:00
parent 368d3ee65e
commit 5415afe8bf
2 changed files with 2 additions and 3 deletions

View File

@ -17,7 +17,6 @@ class TabItem extends SilverStripeComponent {
onExiting, onExiting,
onExited, onExited,
animation, animation,
id,
unmountOnExit, unmountOnExit,
} = this.props; } = this.props;
@ -33,9 +32,7 @@ class TabItem extends SilverStripeComponent {
onExiting, onExiting,
onExited, onExited,
animation, animation,
id,
unmountOnExit, unmountOnExit,
'aria-labelledby': this.props['aria-labelledby'],
}; };
} }

View File

@ -14,6 +14,7 @@ class Tabs extends SilverStripeComponent {
onSelect, onSelect,
className, className,
extraClass, extraClass,
id,
} = this.props; } = this.props;
const combinedClassName = `${className} ${extraClass}`; const combinedClassName = `${className} ${extraClass}`;
@ -22,6 +23,7 @@ class Tabs extends SilverStripeComponent {
className: combinedClassName, className: combinedClassName,
defaultActiveKey: this.getDefaultActiveKey(), defaultActiveKey: this.getDefaultActiveKey(),
onSelect, onSelect,
id,
}; };
} }