getSaveFormAction prevents data from updating record and its relationships

i want to hide or disable save changes button and do its own trigger action when not hidden or disabled this is what i did now
protected function getSaveFormAction(): Action
{
return Action::make('save_changes')
->disabled(function (Warehouse $record) {
$warehouse = app(Warehouse::class);
$linkedTransactions = $warehouse->checkLink($record['id']);
if (empty($linkedTransactions)) {
return false;
}
return true;
});
}
protected function getSaveFormAction(): Action
{
return Action::make('save_changes')
->disabled(function (Warehouse $record) {
$warehouse = app(Warehouse::class);
$linkedTransactions = $warehouse->checkLink($record['id']);
if (empty($linkedTransactions)) {
return false;
}
return true;
});
}
please help me find a solution
Solution:
i got it just add ->action('save')
Jump to solution
1 Reply
Solution
Adnan Yalahow
Adnan Yalahow3mo ago
i got it just add ->action('save')