From 9172656b5a495e46ad9a17c23758486d5c29a2de Mon Sep 17 00:00:00 2001 From: AllenFang Date: Sat, 13 Aug 2016 21:23:12 +0800 Subject: [PATCH] fix #623 --- src/BootstrapTable.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/BootstrapTable.js b/src/BootstrapTable.js index 3f78a9b77..1c9ba14b0 100644 --- a/src/BootstrapTable.js +++ b/src/BootstrapTable.js @@ -877,6 +877,14 @@ class BootstrapTable extends Component { header.childNodes[i].style.width = result; header.childNodes[i].style.minWidth = result; } + } else { + React.Children.forEach(this.props.children, (child, i) => { + if (child.props.width) { + console.log('yayay'); + header.childNodes[i].style.width = `${child.props.width}px`; + header.childNodes[i].style.minWidth = `${child.props.width}px`; + } + }); } }