F
Filamentβ€’2mo ago
MilenKo

Table Actions Column Label alignment

Hello All. It might sound silly but I've been trying to figure out a way to just align the resource Actions column in the table view and I can't seem to find a way to achieve just that silly action. By default all the Table columns have their content and labels aligned to the left, but the actions table column has a right alignment. Based on the documentation, I am able to align the actions themselves to left/right using helper classes, but what I am after is to set the alignment for the label itself. To set the Actions column inside the resource table view I am using: ->actionsColumnLabel('Actions') (where 'Actions' is the desired column name). Even though there is a helper class to align the actions for each row, I am struggling to find a way to provide an extra class or alignment to the label itself. Also I am in a research of a way to add an icon to any table column to make the tables more expressing or UI appealing, however I seem to struggle to pass an icon() tag as well... Any ideas or suggestions to have a simple and elegant solution?
11 Replies
MilenKo
MilenKoβ€’2mo ago
I guess I can apply some custom style to the livewire component of the table, however I am after a simple and elegant way without too much tinkering of sources as to avoid any update break-ups later on πŸ™‚
awcodes
awcodesβ€’2mo ago
Got a pic of what you’re trying to achieve? Not totally following you.
MilenKo
MilenKoβ€’2mo ago
Hekki @awcodes Yes, for sure I have a picture πŸ™‚ Hope it explains it all better than 1000 words πŸ™‚
No description
MilenKo
MilenKoβ€’2mo ago
So State Name column is having it's title and context aligned to left, but actions are aligned to right with their Actions text column name. I can alignn the actions themselves to the left, but I did not find a way to alignt the column title to left as well As I said, it is not that important, but it is a learning curve and I always pick the toughest tricks to complete so that I learn how to achieve it on the way πŸ™‚
awcodes
awcodesβ€’2mo ago
Looks like it’s hard coded to be right if actionsColumnLabel is set. So, without a PR the easiest thing is to setup a custom theme and just target it with css to change it.
MilenKo
MilenKoβ€’2mo ago
Well, I've added an issue report to see if that can be an improvement or just me wants it to be as such πŸ™‚ So far I am OK with the alignement, just it does not make much sense that we have the alignement for actions (for RTL or LTR) but we can't move the Actions table text to LTR/RTL πŸ™‚
MilenKo
MilenKoβ€’2mo ago
Thanks for looking into this. I think on this I can consider the task as closed.. πŸ™‚
awcodes
awcodesβ€’2mo ago
Seems odd to me too.
MilenKo
MilenKoβ€’2mo ago
I will have a look at the code and apply the same alignement as the column actions and that should resolve the issue as we already have a parameter for them to be RTL<>LTR. It should be a simple fix, I just have not done mucg of PR as i just worked on my own or proprietary projects that are behind NDA and might be a bit rusty, but it will be just another learning curve πŸ™‚
awcodes
awcodesβ€’2mo ago
Yea. PRs are pretty straight forward. Luke Downing has a great series on Laracasts. Maybe start with that.
Want results from more Discord servers?
Add your server