Added missing key attributes to the table rows.

feature/appm-store/pbac
Menaka Jayawardena 7 years ago
parent 9ce111b724
commit e32b6d167c

@ -161,6 +161,6 @@ class BaseLayout extends Component {
BaseLayout.propTypes = {
children: PropTypes.element
}
};
export default withRouter(BaseLayout);

@ -88,7 +88,8 @@ class DataTable extends Component {
adjustForCheckbox={ false }>
<TableRow>
{headers.map((header) => {
return (<DataTableHeader style={{display: 'flex'}} key={header.id} header={header}/>)
return (<DataTableHeader key={header.data_id}
style={{display: 'flex'}} header={header}/>)
}
)}
</TableRow>

@ -61,7 +61,7 @@ class DataTableHeader extends Component {
}
return (
<TableHeaderColumn style={{paddingLeft: '0px'}} key={this.props.header.id}>
<TableHeaderColumn key={this.props.header.id} style={{paddingLeft: '0px'}} >
{headerCell}
</TableHeaderColumn>
);

@ -47,13 +47,13 @@ class DataTableRow extends Component {
render() {
const {dataItem} = this.state;
return (
<TableRow onClick={this._handleClick.bind(this)} >
<TableRow key={this.props.key} onClick={this._handleClick.bind(this)} >
{Object.keys(dataItem).map((key) => {
if (key !== 'id') {
return <TableRowColumn style={{alignItems: 'center'}}
key={key}>{dataItem[key]}</TableRowColumn>
} else {
return <TableRowColumn/>
return <TableRowColumn key={key}/>
}
} )}

Loading…
Cancel
Save