F
Filament15mo ago
Crylar

Is it possible to refresh table content on action?

I have a custom action -
Tables\Actions\Action::make('status.confirm')
->button()
->label('Confirm Order')
->color('success')
->action(function (Order $record) {
$record->status = OrderStatus::CONFIRMED;
$record->save();
})->visible(fn (Order $record) => $record->status == OrderStatus::PAID),
Tables\Actions\Action::make('status.confirm')
->button()
->label('Confirm Order')
->color('success')
->action(function (Order $record) {
$record->status = OrderStatus::CONFIRMED;
$record->save();
})->visible(fn (Order $record) => $record->status == OrderStatus::PAID),
I would like to somehow trigger a table refresh to reflect a new update for the record.
3 Replies
Dan Harrin
Dan Harrin15mo ago
Tables refresh automatically when an action finishes
Shipu Ahamed
Shipu Ahamed15mo ago
how to refresh sidebar menu after custom table action @Dan Harrin
Dan Harrin
Dan Harrin15mo ago
you have to refresh the whole page