Skip to content

Commit

Permalink
fix #952
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Jan 12, 2017
1 parent efcbc35 commit 9202f31
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/BootstrapTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class BootstrapTable extends Component {
currPage = this.props.options.pageStartIndex;
}

this._adjustHeaderWidth = this._adjustHeaderWidth.bind(this);
this._adjustHeight = this._adjustHeight.bind(this);
this._adjustTable = this._adjustTable.bind(this);

this.state = {
data: this.getTableData(),
currPage: currPage,
Expand Down Expand Up @@ -400,7 +404,7 @@ class BootstrapTable extends Component {

handleExpandRow = expanding => {
this.setState({ expanding }, () => {
this.props.adjustHeaderWidth();
this._adjustHeaderWidth();
});
}

Expand Down Expand Up @@ -950,14 +954,14 @@ class BootstrapTable extends Component {
this.refs.header.refs.container.scrollLeft = e.currentTarget.scrollLeft;
}

_adjustTable = () => {
_adjustTable() {
if (!this.props.printable) {
this._adjustHeaderWidth();
}
this._adjustHeight();
}

_adjustHeaderWidth = () => {
_adjustHeaderWidth() {
const header = this.refs.header.getHeaderColGrouop();
const headerContainer = this.refs.header.refs.container;
const tbody = this.refs.body.refs.tbody;
Expand Down Expand Up @@ -996,7 +1000,7 @@ class BootstrapTable extends Component {
}
}

_adjustHeight = () => {
_adjustHeight() {
const { height } = this.props;
let { maxHeight } = this.props;
if ((typeof height === 'number' && !isNaN(height)) || height.indexOf('%') === -1) {
Expand Down

0 comments on commit 9202f31

Please sign in to comment.