Move Table Actions to the right
If using the content-grid for tables instead of traditional tables, how can I move the column actions to the right? I've tried "justify-end" as extraAttribute, but it didn't work. But I can see inside the HTML that there's a "justify-start". How can I change this?
16 Replies
please show a screenshot of what you're looking for
I want the details button on the right.
justify-end
would work, but in the code example above, it doesn't work like this.!justify-end
?oh, i dont think thats an option
Because it needs to overwrite the other one? Otherwise target the action via CSS
i dont think justify-end will work
the class will be on the wrong element
maybe
->extraAttributes(['class' => 'ml-auto'])
wouldOh didn't see it was put on the action itself
ah yeah, ml-auto works. But just to be sure, there's no way to put any class on the element above, right?
only with css
by targetting filament-tables-actions-container
Conditionally hiding cols for each record isn't possible, right? I've seen in another post, that $record isn't available. But it would be pretty nice to e.g. hide the end_date if it's the same like start_date in this view (see screenshot).
It would make sense in this context but not for tables. I guess that's why it's not possible currently
you can use extraAttributes() again and pass in the $record there
i think there would still be complications
particularly surrounding things like sortable and searchable columns
and then use display: none or how would you hide it then?
yeah, or the
hidden
classI see, well in a "dream world" I could hide start_date and end_date and display another field just for the single date for this context. But as it's a table I see that it's not a good approach. How would you approach this? I think currently there's no other way for the admin panel to have something like this other than a table.
you can use getStateUsing() on the end_date and return null if its the same as the start_date