Skip to content

Commit f6bece0

Browse files
committed
Merge branch 'volodalexey-group-header-fix'
2 parents 37fab37 + 79cbd5c commit f6bece0

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/BootstrapTable.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,13 +1271,17 @@ class BootstrapTable extends Component {
12711271
}
12721272
}
12731273
} else {
1274-
// debugger;
1275-
React.Children.forEach(this.props.children, (child, i) => {
1276-
if (child && child.props.width) {
1277-
header[i].style.width = `${child.props.width}px`;
1278-
header[i].style.minWidth = `${child.props.width}px`;
1274+
for (const i in bodyHeader) {
1275+
if (bodyHeader.hasOwnProperty(i)) {
1276+
const child = bodyHeader[i];
1277+
if (child.style.width) {
1278+
header[i].style.width = child.style.width;
1279+
}
1280+
if (child.style.minWidth) {
1281+
header[i].style.minWidth = child.style.minWidth;
1282+
}
12791283
}
1280-
});
1284+
}
12811285
}
12821286
this.isVerticalScroll = isScroll;
12831287
}

0 commit comments

Comments
 (0)