File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -386,6 +386,9 @@ export default class Style {
386386 let normalOffset = 0 ;
387387
388388 this . datamanager . getColumns ( ) . forEach ( ( column ) => {
389+ const $headerCell = this . getColumnHeaderElement ( column . colIndex ) ;
390+ const renderedWidth = $headerCell ? $headerCell . offsetWidth : column . width ;
391+
389392 if ( column . sticky ) {
390393 const selector = `.dt-cell--col-${ column . colIndex } .dt-cell--sticky` ;
391394 const style = {
@@ -394,11 +397,12 @@ export default class Style {
394397
395398 column . stickyLeft = stickyOffset ;
396399 column . stickyScrollTrigger = normalOffset - stickyOffset ;
400+ column . renderedWidth = renderedWidth ;
397401 this . setStyle ( selector , style ) ;
398402 stickySelectors . push ( selector ) ;
399- stickyOffset += column . width ;
403+ stickyOffset += renderedWidth ;
400404 }
401- normalOffset += column . width ;
405+ normalOffset += renderedWidth ;
402406 } ) ;
403407
404408 const staleSelectors = ( this . _stickySelectors || [ ] )
You can’t perform that action at this time.
0 commit comments