Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Sticky header in MDBTable does not work in Chrome and Opera

Wojciech Marciniak free asked 5 years ago


Expected behavior

The header should stick as designed. This works in Safari and Firefox

Actual behavior

Does not stick.

Resources (screenshots, code snippets etc.)

This works in all environments, including iOS and incriminated Chrome & Opera:

<div style="width: 100%; height: 300px; overflow: auto">
  <div style="height: 300px">first element</div>
  <p style="position: sticky; position: -webkit-sticky; top: 0">STAY ON TOP</p>
  <div style="height: 300px">another element</div>
</div>

but MDB own example fails in two aforementioned browsers:

https://ng-demo.mdbootstrap.com/tables/data-tables

So does any code with stickyHeader="true" and <thead class="sticky-top"> set within mdbTable element.


Bartosz Termena staff answered 5 years ago


Dear @Wojciech Marciniak

This problem is solved in the 8.1.0 version of MDB Angular.

Best Regards, Bartosz.


Wojciech Marciniak free commented 5 years ago

Is 8.1.0 available via CLI?. While following your update procedure (delete node-modules , npm install) I still get 8.0.0.


Wojciech Marciniak free commented 5 years ago

Funny we all write in English being staff (100%?) and users (20%+?) Polish.


Arkadiusz Idzikowski staff commented 5 years ago

You can use npm install "git+https://oauth2:YOUR_TOKEN@git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git" --save to get latest (8.1.1) version.

As for the language on the forum - it might be strange in some cases, but all our users need to have access to the information available here.


Wojciech Marciniak free commented 5 years ago

Looks promising :-). But where do I find my token?


Arkadiusz Idzikowski staff commented 5 years ago

We explained how to generate new token in our Quick Start Guide (npm installation section, pro tab). As a pro user, you should have access to our gitlab.

https://mdbootstrap.com/docs/angular/getting-started/quick-start/


Wojciech Marciniak free commented 5 years ago

Solved. Thank you.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.0.0
  • Device: iMac, PC
  • Browser: Chrome, Opera
  • OS: macOS 10.14.6, Windows 7
  • Provided sample code: Yes
  • Provided link: Yes