Tables\Actions\Action::make('test')
->label('test')
->form(function ($record) {
return [
Forms\Components\Select::make('quote_status')
->options([
'draft' => 'Draft',
'new' => 'New',
'process' => 'Process',
'done' => 'Done',
'expired' => 'Expired',
'cancelled' => 'Cancelled',
])
->default($record->quote_status)
->searchable()
->preload()
->required(),
];
})
->action(function ($record, array $data): void {
$record->update($data);
// Handle update success (optional)
Notification::make()
->title('Successfully update')
->success()
->send();
}),
filament table, get current selected row data in action button form
by
Tags:
Leave a Reply