daisyui
daisyui copied to clipboard
Feature request: Add the possibility to fix table header row
Hello,
would it be possible to implement a way in which a table's header row is 'pinned' and only the following columns are scrollable?
Hello @saadeghi, May i get assigned this issue?
@urtheaman sure
Thank You.
I'm sorry for being late sir. i'll make the pr today.
No problem! Let me know if I can help
I think @urtheaman is offline, can I get assigned?
@xvimnt There's a PR by @urtheaman (Thanks!): https://github.com/saadeghi/daisyui/pull/918
But honestly I haven't tested it yet.
The challenge:
I can't decide which way it should be.
Currently table's first column (tr>th
) is sticky by default and some people asked for a non-sticky column as a default. I'm not sure about how adding these new class names pinned-row
and pinned-col
should affect that.
- Maybe we can just remove the default sticky style and make it possible to be sticky by adding these new class names
- Maybe instead of 2 new class names
pinned-row
andpinned-col
it can be onepinned
class. I'm not sure. - What happens if many rows and columns have that pinned class? (I haven't tested it yet)
I don't want to add a new style that might create potential problems and then I after people started using it, turns out there were unpredicted issues. At this point I'm not sure which way is the safest way to handle it and I haven't invest time to explore possible downsides because I was focusing on other stuff.