You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CI4: Bootstrap-table header broken on scroll #3854
bootstrap-table handles creating the table header and body. The header is pinned during scroll, which is good, but on scroll it breaks causing the formerly non-visible header columns to appear and scrolling to no longer be fixed to the table.
You can see below that the header row is decoupled in horizontal scrolling from the table body. This does not happen when the header is not trying to pin itself.
I upgraded the version of bootstrap-table to 1.22.1, but the issue persists. I was able to duplicate the issue on the bootstrap-table demo page of their website, so this is an issue specific to the StickyHeaders functionality in bootstrap-table. I created an issue in their repo wenzhixin/bootstrap-table#7090
Thanks for looking into this @objecttothis ! I wonder if there would be a way to make the table more responsive.
It's responsive for large and medium screens but not for small. It's possible that moving everything to bootstrap 5 will make it easier to make the entire table responsive. Likely the goal will be to specify how wide the table view is able to get down to and possibly to make the footer sticky on small displays. We may need to replace bootstrap-table if it can't do these things.
The owner of the bootstrap-tables repo believes this issue is limited to bootstrap 3 which is EOL so it's a won't fix. I'm not convinced that it only affects bootstrap 3 because it's visible even on their demo site, which I don't think is using bootstrap 3. That said, if the issue is indeed not a problem with bootstrap 5, then the solution would be to migrate to bootstrap 5.
The bootstrap-table dev suggests adding this code will fix the issue but I couldn't get it to work. Perhaps I was either adding it to the wrong place or the code is running minimized versions of the javascript and ignoring my changes.
I added the code just above the table init code. I tried manage_tables.js, tabular.php and tabular_details.php but none had an effect on the issue. Maybe someone else can take a crack at it.
Activity
objecttothis commentedon Dec 12, 2023
I upgraded the version of bootstrap-table to 1.22.1, but the issue persists. I was able to duplicate the issue on the bootstrap-table demo page of their website, so this is an issue specific to the StickyHeaders functionality in bootstrap-table. I created an issue in their repo wenzhixin/bootstrap-table#7090
jekkos commentedon Dec 12, 2023
Thanks for looking into this @objecttothis ! I wonder if there would be a way to make the table more responsive.
objecttothis commentedon Dec 12, 2023
It's responsive for large and medium screens but not for small. It's possible that moving everything to bootstrap 5 will make it easier to make the entire table responsive. Likely the goal will be to specify how wide the table view is able to get down to and possibly to make the footer sticky on small displays. We may need to replace bootstrap-table if it can't do these things.
I just checked this example on their site (https://examples.bootstrap-table.com/) and it's much more responsive with sticky footers, so it looks like we may be able to make it work... they are using Bootstrap 5 though.
jekkos commentedon Dec 20, 2023
I saw some activity in the bootstrap tables project for this one, will check if we can upgrade to the latest commit.
Bump bstables (#3854)
Bump bstables (#3854)
Bump bstables (#3854)
Bump bstables (#3854)
Bump bstables (#3854)
Bump bstables (#3854)
Bump bstables (#3854)
Bump bstables (#3854)
19 remaining items
Bump Bootstrap-table to 1.23.5
objecttothis commentedon Nov 4, 2024
The owner of the bootstrap-tables repo believes this issue is limited to bootstrap 3 which is EOL so it's a won't fix. I'm not convinced that it only affects bootstrap 3 because it's visible even on their demo site, which I don't think is using bootstrap 3. That said, if the issue is indeed not a problem with bootstrap 5, then the solution would be to migrate to bootstrap 5.
objecttothis commentedon Nov 4, 2024
The bootstrap-table dev suggests adding this code will fix the issue but I couldn't get it to work. Perhaps I was either adding it to the wrong place or the code is running minimized versions of the javascript and ignoring my changes.
I added the code just above the table init code. I tried manage_tables.js, tabular.php and tabular_details.php but none had an effect on the issue. Maybe someone else can take a crack at it.
wenzhixin/bootstrap-table#7578 (comment)
jekkos commentedon Nov 4, 2024
I believe @BudsieBuds had some bs5 prototype he wanted to show me, curious if that could get us kick started. For the js did you run the gulp install?
objecttothis commentedon Nov 4, 2024
Yep,
BudsieBuds commentedon Nov 5, 2024
Yes, I'll make sure to get this to you.
jekkos commentedon Nov 28, 2024
A potential solution was posted in wenzhixin/bootstrap-table#7090 (comment). I tried it out but not sure if it fixes the issue
jekkos commentedon Nov 28, 2024
I removed both offsets and looks better now . Pushed this to master now. Hope this will suffice.

Remove sticky headers offset (#3854)
objecttothis commentedon Nov 29, 2024
Super I'd say let's push that and we can close this issue.
jekkos commentedon Nov 29, 2024
Should be fixed, will close
odiea commentedon Nov 29, 2024
Works great. Thanks
Fix sticky header issue in reports (#3854)