Skip to content

Commit

Permalink
fix #1116 - iterate through real child
Browse files Browse the repository at this point in the history
  • Loading branch information
volodalexey committed May 29, 2017
1 parent 2fcb24f commit 4b1e11e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/BootstrapTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1271,12 +1271,17 @@ class BootstrapTable extends Component {
}
}
} else {
React.Children.forEach(this.props.children.filter(_ => !!_), (child, i) => {
if (child.props.width) {
header[i].style.width = `${child.props.width}px`;
header[i].style.minWidth = `${child.props.width}px`;
for (const i in bodyHeader) {
if (bodyHeader.hasOwnProperty(i)) {
const child = bodyHeader[i];
if (child.style.width) {
header[i].style.width = child.style.width;
}
if (child.style.minWidth) {
header[i].style.minWidth = child.style.minWidth;
}
}
});
}
}
this.isVerticalScroll = isScroll;
}
Expand Down

0 comments on commit 4b1e11e

Please sign in to comment.