Skip to content

Commit

Permalink
Merge pull request #1198 from dangerbell/master
Browse files Browse the repository at this point in the history
Fixing problem with externally controlling expanded rows.
  • Loading branch information
AllenFang authored Apr 7, 2017
2 parents 00dab2a + a1996ff commit 6f0b5fb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/BootstrapTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,14 @@ class BootstrapTable extends Component {
});
}

// If setting the expanded rows is being handled externally
// then overwrite the current expanded rows.
if (this.props.options.expanding !== options.expanding) {
this.setState({
expanding: options.expanding || []
});
}

if (selectRow && selectRow.selected) {
// set default select rows to store.
const copy = selectRow.selected.slice();
Expand Down

0 comments on commit 6f0b5fb

Please sign in to comment.