material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

Table onRowSelection bug

Open b4456609 opened this issue 11 years ago • 1 comments

Here is my code

<Table
  headerColumns={headerCols}
  columnOrder={colOrder}
  rowData={this.state.rowData}
  fixedHeader={this.state.fixedHeader}
  fixedFooter={this.state.fixedFooter}
  stripedRows={this.state.stripedRows}
  showRowHover={this.state.showRowHover}
  selectable={this.state.selectable}
  multiSelectable={this.state.multiSelectable}
  canSelectAll={this.state.canSelectAll}
  deselectOnClickaway={this.state.deselectOnClickaway}
  onRowSelection={this._onRowSelection} />
_onRowSelection: function (selected) {
  console.log(selected);
},

I click item 0. The console display 4 logs

[0]
[0]
[0]
[0]
[]

And then I click item 2. The console also display 4 logs

[2]
[2]
[2]
[2]
[]

The function should be called once when user select a item.

b4456609 avatar Jul 10 '15 09:07 b4456609

Sorry, not a bug. It works after I update material-ui.

b4456609 avatar Jul 10 '15 13:07 b4456609