F
Filamentβ€’2y ago
Hurruwa

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
toekneeβ€’2y ago
Actions are separate columns so I can't see how you could do that.
Dan Harrin
Dan Harrinβ€’2y ago
maybe put them in an action group it would be a dropdown though
Hurruwa
HurruwaOPβ€’2y 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 Harrinβ€’2y ago
what happens if you try that
Hurruwa
HurruwaOPβ€’2y ago
It wont show in any case
Hurruwa
HurruwaOPβ€’2y ago
It sopused to be visible on the first 2 rows
Hurruwa
HurruwaOPβ€’2y ago
And i know the condition to work since when i change the visible to hidden it in did shows
Hurruwa
HurruwaOPβ€’2y ago
Dan Harrin
Dan Harrinβ€’2y ago
sounds like a bug you should report it with a reproduction repo
Hurruwa
HurruwaOPβ€’2y 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 Harrinβ€’2y ago
and then if you hide all actions, does the group hide itself?
Hurruwa
HurruwaOPβ€’2y ago
It does
Dan Harrin
Dan Harrinβ€’2y ago
nice
Hurruwa
HurruwaOPβ€’2y 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
Want results from more Discord servers?
Add your server