File tree Expand file tree Collapse file tree 3 files changed +15
-13
lines changed
Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 311311 } , {
312312 key : 'setScrollBarDims' ,
313313 value : function setScrollBarDims ( ) {
314+ var width = this . getNodeSize ( this . dom . bodyTable . firstChild ) . width ;
315+ this . dom . xScrollbar . firstChild . style . width = width + 'px' ;
316+
314317 this . xScrollSize = this . dom . xScrollbar . offsetHeight - this . dom . xScrollbar . clientHeight ;
318+
319+ var height = this . getNodeSize ( this . dom . bodyTable ) . height + this . xScrollSize - this . dom . stickyHeader . offsetHeight ;
320+ this . dom . yScrollbar . firstChild . style . height = height + 'px' ;
321+
315322 this . yScrollSize = this . dom . yScrollbar . offsetWidth - this . dom . yScrollbar . clientWidth ;
316323
317324 if ( ! this . isFirefox ) {
318325 this . setScrollBarPaddings ( ) ;
319326 }
320327
321- var width = this . getNodeSize ( this . dom . bodyTable . firstChild ) . width ;
322- this . dom . xScrollbar . firstChild . style . width = width + 'px' ;
323-
324- var height = this . getNodeSize ( this . dom . bodyTable ) . height + this . xScrollSize - this . dom . stickyHeader . offsetHeight ;
325- this . dom . yScrollbar . firstChild . style . height = height + 'px' ;
326-
327328 if ( this . xScrollSize ) this . dom . xScrollbar . style . height = this . xScrollSize + 1 + 'px' ;
328329 if ( this . yScrollSize ) this . dom . yScrollbar . style . width = this . yScrollSize + 1 + 'px' ;
329330 }
Original file line number Diff line number Diff line change 11{
22 "name" : " react-sticky-table" ,
3- "version" : " 2.0.0 " ,
3+ "version" : " 2.0.1 " ,
44 "main" : " index.js" ,
55 "module" : " ./index.js" ,
66 "description" : " Dynamically sized fixed header and columns for tables" ,
Original file line number Diff line number Diff line change @@ -257,19 +257,20 @@ class StickyTable extends PureComponent {
257257 * @returns {undefined }
258258 */
259259 setScrollBarDims ( ) {
260+ var width = this . getNodeSize ( this . dom . bodyTable . firstChild ) . width ;
261+ this . dom . xScrollbar . firstChild . style . width = width + 'px' ;
262+
260263 this . xScrollSize = this . dom . xScrollbar . offsetHeight - this . dom . xScrollbar . clientHeight ;
264+
265+ var height = this . getNodeSize ( this . dom . bodyTable ) . height + this . xScrollSize - this . dom . stickyHeader . offsetHeight ;
266+ this . dom . yScrollbar . firstChild . style . height = height + 'px' ;
267+
261268 this . yScrollSize = this . dom . yScrollbar . offsetWidth - this . dom . yScrollbar . clientWidth ;
262269
263270 if ( ! this . isFirefox ) {
264271 this . setScrollBarPaddings ( ) ;
265272 }
266273
267- var width = this . getNodeSize ( this . dom . bodyTable . firstChild ) . width ;
268- this . dom . xScrollbar . firstChild . style . width = width + 'px' ;
269-
270- var height = this . getNodeSize ( this . dom . bodyTable ) . height + this . xScrollSize - this . dom . stickyHeader . offsetHeight ;
271- this . dom . yScrollbar . firstChild . style . height = height + 'px' ;
272-
273274 if ( this . xScrollSize ) this . dom . xScrollbar . style . height = this . xScrollSize + 1 + 'px' ;
274275 if ( this . yScrollSize ) this . dom . yScrollbar . style . width = this . yScrollSize + 1 + 'px' ;
275276 }
You can’t perform that action at this time.
0 commit comments