Avoid duplicate react keys in board select dialog

Signed-off-by: jbicker <jan.bicker@typefox.io>
This commit is contained in:
jbicker 2019-07-25 18:04:59 +02:00
parent 17fab651e5
commit 436e660d47

View File

@ -62,8 +62,8 @@ export class BoardAndPortSelectionList extends React.Component<BoardAndPortSelec
render(): React.ReactNode {
return <div className={`${this.props.type} list`}>
{this.props.list.map(item => <BoardAndPortSelectableItem
key={item.board ? item.board.name : item.port}
{this.props.list.map((item, idx) => <BoardAndPortSelectableItem
key={(item.board ? item.board.name : item.port || '') + idx}
onSelect={this.doSelect}
item={item}
selected={this.isSelectedItem(item)}