Skip to content

Commit

Permalink
[Table] Added key to selectall column in TableHeader. Addresses mui#2028
Browse files Browse the repository at this point in the history
  • Loading branch information
camfletch committed Nov 1, 2015
1 parent c66ff3d commit 0b57d95
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/table/table-header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ const TableHeader = React.createClass({
children.push(child);
});

console.log('key is ', props.key)
return React.cloneElement(child, props, children);
},

Expand Down Expand Up @@ -152,8 +153,8 @@ const TableHeader = React.createClass({
},

_getSelectAllCheckboxColumn(props) {
if (!this.props.displaySelectAll) return this._getCheckboxPlaceholder(props);

if (!this.props.displaySelectAll) return this._getCheckboxPlaceholder(props);
const checkbox =
<Checkbox
key="selectallcb"
Expand All @@ -163,8 +164,9 @@ const TableHeader = React.createClass({
checked={this.props.selectAllSelected}
onCheck={this._onSelectAll} />;

const key = 'hpcb' + props.rowNumber;
return (
<TableHeaderColumn style={{width: 24}}>
<TableHeaderColumn key={key} style={{width: 24}}>
{checkbox}
</TableHeaderColumn>
);
Expand Down

0 comments on commit 0b57d95

Please sign in to comment.