Skip to content

Commit

Permalink
Merge pull request mui#1609 from umidbekkarimov/master
Browse files Browse the repository at this point in the history
[Table] onRowSelection return 'none' string on unselect all
  • Loading branch information
oliviertassinari committed Oct 31, 2015
2 parents fd346dd + 3f8825f commit 6141e2b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/table/table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,14 @@ const Table = React.createClass({
},

_onSelectAll() {
if (this.props.onRowSelection && !this.state.allRowsSelected) this.props.onRowSelection('all');
if (this.props.onRowSelection) {
if (!this.state.allRowsSelected) {
this.props.onRowSelection('all');
} else {
this.props.onRowSelection('none');
}
}

this.setState({allRowsSelected: !this.state.allRowsSelected});
},

Expand Down

0 comments on commit 6141e2b

Please sign in to comment.