F
Filament15mo ago
Crylar

Table action button is not getting updated after action executed

In v2 the color, label, disabled used to update after the action finished but this is different in v3. How can I bring the old behaviour and re-render the table?
Actions\Action::make('activate')
->button()
->disabled(fn (Arena $record) => $record->id == $activeVenueId)
->label(fn (Arena $record) => $record->id == $activeVenueId ? __('filament/venues.active') : __('filament/venues.activate'))
->color(fn (Arena $record) => $record->id == $activeVenueId ? 'gray' : 'success')
->action(function (Arena $record) {
Auth::user()->switchArena($record);

Notification::make()
->title(new HtmlString('<span class="font-bold underline">'. $record->title .'</span> is active now!'))
->success()
->send();
})
Actions\Action::make('activate')
->button()
->disabled(fn (Arena $record) => $record->id == $activeVenueId)
->label(fn (Arena $record) => $record->id == $activeVenueId ? __('filament/venues.active') : __('filament/venues.activate'))
->color(fn (Arena $record) => $record->id == $activeVenueId ? 'gray' : 'success')
->action(function (Arena $record) {
Auth::user()->switchArena($record);

Notification::make()
->title(new HtmlString('<span class="font-bold underline">'. $record->title .'</span> is active now!'))
->success()
->send();
})
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server