minifix(GUI): resolve react missing key field warning (#2354)

We attach key fields where necessary to make the warnings go away.

Change-Type: patch
This commit is contained in:
Benedict Aas 2018-05-21 11:23:20 +01:00 committed by GitHub
parent 3083f5fd55
commit ce2534c5b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -317,6 +317,7 @@ const Breadcrumbs = styled((props) => {
_.map(dirs.slice(-MAX_DIR_CRUMBS), (dir, index) => {
return (
<rendition.Button
key={ dir.fullpath }
onClick={ () => props.selectFile(dir) }
plaintext={ true }>
<rendition.Txt bold={ index === dirs.length - 1 }>
@ -427,6 +428,7 @@ class FileSelector extends React.PureComponent {
items.map((item, index) => {
return (
<FileLink { ...item }
key={ item.fullpath }
highlight={ _.get(this.state.highlighted, 'fullpath') === _.get(item, 'fullpath') }
onClick={ () => this.setState({ highlighted: item }) }
onDoubleClick={ _.partial(this.selectFile, item) }