clear unique key prop err for tab nav (#40686) (#41270)

## Summary

Move key up to new wrapper on tab nav in order to clear the unique prop console err.

to test: load and check the console, no more error. yay!

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~
~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~
~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~
~~- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~~
~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
~~- [ ] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
This commit is contained in:
Frank Hassanabad 2019-07-16 15:32:48 -06:00 committed by GitHub
parent bdb517b8fa
commit 3b7fc4b357
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,14 +93,13 @@ export class TabNavigation extends React.PureComponent<TabNavigationProps, TabNa
private renderTabs = () =>
navTabs.map((tab: NavTab) => (
<TabContainer className="euiTab">
<TabContainer className="euiTab" key={`navigation-${tab.id}`}>
<EuiLink data-test-subj={`navigation-link-${tab.id}`} href={tab.href + this.props.search}>
<EuiTab
data-href={tab.href}
data-test-subj={`navigation-${tab.id}`}
disabled={tab.disabled}
isSelected={this.state.selectedTabId === tab.id}
key={`navigation-${tab.id}`}
onClick={() => {
track(`tab_${tab.id}`);
}}