suankularb-wittayalai-school / sk-components

A design system for all Suankularb applications
https://sk-components-demo.mysk.school
0 stars 1 forks source link

Table Header and Footer should be vertically fixed on scroll #37

Open SiravitPhokeed opened 2 years ago

SiravitPhokeed commented 2 years ago

Describe the idea On Tables that scroll, its Header and Footer should stick to the top and the bottom of the table respectively, but it should still scroll horizontally with the Table.

SiravitPhokeed commented 2 years ago

Turns out this behavior is very difficult or even impossible to implement in pure CSS and is highly discouraged. If we need to see the header and footer at all times for some reason, we could have a completely separate element fly in from the top using JavaScript. I don’t think this is for SK Components.

SiravitPhokeed commented 1 year ago

Turns out this behavior is very difficult or even impossible to implement in pure CSS and is highly discouraged.

It's surprisingly just position: sticky and inset: 0 0 auto 0. CSS is a wonder. We have implemented a fixed head option in #85 but it’s left to be seen if we’ll do the foot.