Skip to content

Commit ca7a9dd

Browse files
committed
fix #1159
1 parent 1229e7e commit ca7a9dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/BootstrapTable.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class BootstrapTable extends Component {
2323
this.isIE = document.documentMode;
2424
}
2525
this.store = new TableDataStore(this.props.data ? this.props.data.slice() : []);
26-
26+
this.isVerticalScroll = false;
2727
this.initTable(this.props);
2828

2929
if (this.props.selectRow && this.props.selectRow.selected) {
@@ -1152,7 +1152,7 @@ class BootstrapTable extends Component {
11521152

11531153
const scrollBarWidth = isScroll ? Util.getScrollBarWidth() : 0;
11541154
if (firstRow && this.store.getDataNum()) {
1155-
if (isScroll) {
1155+
if (isScroll || this.isVerticalScroll !== isScroll) {
11561156
const cells = firstRow.childNodes;
11571157
for (let i = 0; i < cells.length; i++) {
11581158
const cell = cells[i];
@@ -1190,6 +1190,7 @@ class BootstrapTable extends Component {
11901190
}
11911191
});
11921192
}
1193+
this.isVerticalScroll = isScroll;
11931194
}
11941195

11951196
_adjustHeight() {

0 commit comments

Comments
 (0)