bootstrap-table: sticky header offsetY not working

Hello Thanks for this project - First time using it today and its really useful!

I have been trying the sticky Header extention and it seems to be working - Unless you try and add the stickyHeaderOffsetY

using Local host - Uniserver - apache / php and Google chrome

Downloaded today build to 1.15.5

Using config
$table.bootstrapTable({ stickyHeader: true, stickyHeaderOffsetY: 0 , stickyHeaderOffsetLeft: '3em', stickyHeaderOffsetRight: '3em', });

Outputs Table looks good image

On scroll - Sticky seems fine … needs offset

image

checking on inspect : top:0px inline style image

Update Config : $table.bootstrapTable({ stickyHeader: true, stickyHeaderOffsetY: 60 , stickyHeaderOffsetLeft: '3em', stickyHeaderOffsetRight: '3em', });

Header is no longer Sticky :

image

On inspect top inline style is no longer applied

image

Unfortunately there is no on-line example at the moment, Just trying on local

I have a quick fix by adding extra CSS

.sticky-header-container.fix-sticky.fixed-table-container {top: 60px;}

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

this.$stickyContainer.css(‘top’, “”.concat(this.options.stickyHeaderOffsetY)); ===> this.$stickyContainer.css(‘top’, “”.concat(this.options.stickyHeaderOffsetY)+‘px’);

https://live.bootstrap-table.com/code/dreamerworks/1701

No matter what value you pass to stickyHeaderOffsetY, it refuses to work.