Skip to content

Commit

Permalink
Update table.jsx
Browse files Browse the repository at this point in the history
[Table] onRowSelection return 'none' string on unselect all
  • Loading branch information
avocadowastaken committed Sep 8, 2015
1 parent 4e81c7c commit 3f8825f
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 @@ -207,7 +207,14 @@ let 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 3f8825f

Please sign in to comment.