File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -26,17 +26,24 @@ export default class TableScrollbar extends React.Component {
2626
2727 this . handleResize = this . handleResize . bind ( this ) ;
2828 this . handleScroll = this . handleScroll . bind ( this ) ;
29+ this . renderFixedHeader = this . renderFixedHeader . bind ( this ) ;
2930 }
3031
3132 componentDidMount ( ) {
33+ this . renderFixedHeader ( ) ;
3234 addEventListener ( "resize" , this . handleResize ) ;
35+ this . forceUpdate ( ) ;
3336 }
3437
3538 componentWillUnmount ( ) {
3639 removeEventListener ( "resize" , this . handleResize ) ;
3740 }
3841
3942 componentDidUpdate ( ) {
43+ this . renderFixedHeader ( ) ;
44+ }
45+
46+ renderFixedHeader ( ) {
4047 // Remove previous table clone from the DOM.
4148 if ( this . tableclone !== null ) {
4249 if ( this . tableclone . parentNode !== null ) {
@@ -118,6 +125,7 @@ export default class TableScrollbar extends React.Component {
118125 let width = columns [ i ] . clientWidth + "px" ;
119126 cloneColumns [ i ] . style . minWidth = width ;
120127 cloneColumns [ i ] . style . width = width ;
128+ cloneColumns [ i ] . style . boxSizing = "border-box" ;
121129 }
122130 }
123131}
You can’t perform that action at this time.
0 commit comments