Actions in table stacked into columns

Its there a magial == filamental way to have the table actions stacked in a column? Or i have to modify this class "filament-tables-actions-container"?? Thanks in advance.
14 Replies
toeknee
toeknee2y ago
Actions are separate columns so I can't see how you could do that.
Dan Harrin
Dan Harrin2y ago
maybe put them in an action group it would be a dropdown though
Hurruwa
HurruwaOP2y ago
Thanks a lot @danharrin I have tried that.. but then i cant conditionally hide the ActionGroup. this is the code i had for that:
Tables\Actions\ActionGroup::make([
Tables\Actions\Action::make('setToPicking')
->label('Move to Picking')
->button()
->color('primary')
->icon('heroicon-o-clock')
->requiresConfirmation('Are you sure you want to mark this request as done?')
->action('setToPicking', ['record' => '$record']),

Tables\Actions\Action::make('changeQuantity')
->label('Change Quantity')
->button()
->color('primary')
->icon('heroicon-o-clock')
])
->label('Actions')
->icon('heroicon-o-menu')
->visible(fn(Request $record) => $record->type == 'reposition'),
Tables\Actions\ActionGroup::make([
Tables\Actions\Action::make('setToPicking')
->label('Move to Picking')
->button()
->color('primary')
->icon('heroicon-o-clock')
->requiresConfirmation('Are you sure you want to mark this request as done?')
->action('setToPicking', ['record' => '$record']),

Tables\Actions\Action::make('changeQuantity')
->label('Change Quantity')
->button()
->color('primary')
->icon('heroicon-o-clock')
])
->label('Actions')
->icon('heroicon-o-menu')
->visible(fn(Request $record) => $record->type == 'reposition'),
`
Dan Harrin
Dan Harrin2y ago
what happens if you try that
Hurruwa
HurruwaOP2y ago
It wont show in any case
Hurruwa
HurruwaOP2y ago
It sopused to be visible on the first 2 rows
Hurruwa
HurruwaOP2y ago
And i know the condition to work since when i change the visible to hidden it in did shows
Hurruwa
HurruwaOP2y ago
Dan Harrin
Dan Harrin2y ago
sounds like a bug you should report it with a reproduction repo
Hurruwa
HurruwaOP2y ago
Ok, will do. Thanks a lot man @danharrin Got it The thing is that i have to hide the actions inside not the action group itself
Dan Harrin
Dan Harrin2y ago
and then if you hide all actions, does the group hide itself?
Hurruwa
HurruwaOP2y ago
It does
Dan Harrin
Dan Harrin2y ago
nice
Hurruwa
HurruwaOP2y ago
I have no idea but have something to do with:
use Concerns\CanBeHidden {
isHidden as baseIsHidden;
}
use Concerns\CanBeHidden {
isHidden as baseIsHidden;
}
` What i think it would be great if we can hide just the group itself.. less code 😉 but this works for me perfectly. Thanks a lot man for the great work

Did you find this page helpful?