Different bulk actions for each table tab?

Anyone know how to specify different bulk actions for different table tab?
5 Replies
Sandeep
Sandeep3mo ago
You can try like this:
Tables\Actions\BulkAction::make('bulk_archive')
->label('Archive')
->visible(fn ($livewire): bool => $livewire->activeTab !== 'archived' && $livewire->activeTab === 'new' ))
Tables\Actions\BulkAction::make('bulk_archive')
->label('Archive')
->visible(fn ($livewire): bool => $livewire->activeTab !== 'archived' && $livewire->activeTab === 'new' ))
Sandeep
Sandeep3mo ago
No description
Sandeep
Sandeep3mo ago
So the bulk action Archive visible to New tab:
No description
Sandeep
Sandeep3mo ago
But not to Archived tab:
No description
Sandeep
Sandeep3mo ago
Please check the above response, may it will help you
Want results from more Discord servers?
Add your server