diff --git a/src/BootstrapTable.js b/src/BootstrapTable.js index 50ce8b923..18a42b3ab 100644 --- a/src/BootstrapTable.js +++ b/src/BootstrapTable.js @@ -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();