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