Skip to content

Commit 6141e2b

Browse files
Merge pull request mui#1609 from umidbekkarimov/master
[Table] onRowSelection return 'none' string on unselect all
2 parents fd346dd + 3f8825f commit 6141e2b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/table/table.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,14 @@ const Table = React.createClass({
235235
},
236236

237237
_onSelectAll() {
238-
if (this.props.onRowSelection && !this.state.allRowsSelected) this.props.onRowSelection('all');
238+
if (this.props.onRowSelection) {
239+
if (!this.state.allRowsSelected) {
240+
this.props.onRowSelection('all');
241+
} else {
242+
this.props.onRowSelection('none');
243+
}
244+
}
245+
239246
this.setState({allRowsSelected: !this.state.allRowsSelected});
240247
},
241248

0 commit comments

Comments
 (0)