Skip to content

Commit

Permalink
fix TypeError: this.props.children.filter is not a function
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Jun 6, 2017
1 parent 3b2d8f5 commit 80fb5a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/BootstrapTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1271,8 +1271,9 @@ class BootstrapTable extends Component {
}
}
} else {
React.Children.forEach(this.props.children.filter(_ => !!_), (child, i) => {
if (child.props.width) {
// debugger;
React.Children.forEach(this.props.children, (child, i) => {
if (child && child.props.width) {
header[i].style.width = `${child.props.width}px`;
header[i].style.minWidth = `${child.props.width}px`;
}
Expand Down

0 comments on commit 80fb5a6

Please sign in to comment.