Skip to content

Commit 9202f31

Browse files
committed
fix #952
1 parent efcbc35 commit 9202f31

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/BootstrapTable.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ class BootstrapTable extends Component {
3737
currPage = this.props.options.pageStartIndex;
3838
}
3939

40+
this._adjustHeaderWidth = this._adjustHeaderWidth.bind(this);
41+
this._adjustHeight = this._adjustHeight.bind(this);
42+
this._adjustTable = this._adjustTable.bind(this);
43+
4044
this.state = {
4145
data: this.getTableData(),
4246
currPage: currPage,
@@ -400,7 +404,7 @@ class BootstrapTable extends Component {
400404

401405
handleExpandRow = expanding => {
402406
this.setState({ expanding }, () => {
403-
this.props.adjustHeaderWidth();
407+
this._adjustHeaderWidth();
404408
});
405409
}
406410

@@ -950,14 +954,14 @@ class BootstrapTable extends Component {
950954
this.refs.header.refs.container.scrollLeft = e.currentTarget.scrollLeft;
951955
}
952956

953-
_adjustTable = () => {
957+
_adjustTable() {
954958
if (!this.props.printable) {
955959
this._adjustHeaderWidth();
956960
}
957961
this._adjustHeight();
958962
}
959963

960-
_adjustHeaderWidth = () => {
964+
_adjustHeaderWidth() {
961965
const header = this.refs.header.getHeaderColGrouop();
962966
const headerContainer = this.refs.header.refs.container;
963967
const tbody = this.refs.body.refs.tbody;
@@ -996,7 +1000,7 @@ class BootstrapTable extends Component {
9961000
}
9971001
}
9981002

999-
_adjustHeight = () => {
1003+
_adjustHeight() {
10001004
const { height } = this.props;
10011005
let { maxHeight } = this.props;
10021006
if ((typeof height === 'number' && !isNaN(height)) || height.indexOf('%') === -1) {

0 commit comments

Comments
 (0)