F
Filament11mo ago
RixzZ

Hide table header row

Can you hide the header row of a table someway? The doesn’t seem to be a option for that. I can’t find a way to inject css there either.
Solution:
While you may not be able to inject CSS to that part of the table, you can inject CSS elsewhere in the page that targets the selector of that element (if you can specifically identify it). A render-hook for (I think it's called) page.style-end could do it.
Jump to solution
4 Replies
DrByte
DrByte11mo ago
I don't think so. There are a lot of things happening in the table header, so hiding that area could potentially break a lot of functionality. If you're not using any sorting/searching/filtering capabilities, then I suppose you could use CSS to target the header row and hide it, but again, that might break things you weren't expecting. Or you could explore using Grid/Split with your table, since that turns the table into "cards" instead of rows, and headers no longer apply in that context. I don't know if #kenneth-sese-advanced-tables Advanced Tables plugin supports hiding header row, but worth looking at.
RixzZ
RixzZOP11mo ago
Yeah, the table where I want to do this, isn't really much of a table. Nothing is interactive. I'm just using it there because I like the layout that it has when grouping rows, which is perfect for what I wanted. I don't think in my use case, hiding it with CSS would do any harm, but I didn't really see a way to inject CSS there either. I'll take a look to both your suggestions, although at first glace in the docs of ⁠ #kenneth-sese-advanced-tables , I don't see anything that would suggest that function. Thanks a lot!
Solution
DrByte
DrByte11mo ago
While you may not be able to inject CSS to that part of the table, you can inject CSS elsewhere in the page that targets the selector of that element (if you can specifically identify it). A render-hook for (I think it's called) page.style-end could do it.
RixzZ
RixzZOP11mo ago
I’ll try that, thanks! There aren’t other tables in the same page so I guess I should be able to identify it. Ended up adding a render hook as proposed and works perfectly. Thanks!
Want results from more Discord servers?
Add your server