Change trigger button label and style after first submit

Hello everyone! While working with Filament I needed to insert an action into a Livewire component, I managed to get everything running but one small detail remains. After the first submit I need to change the trigger button label and make it inactive. I could find no trace of this in the documentation, not even in this help section (on discord). Can you give me a hint on how to achieve this? A first attempt, which failed, was as follows:
public function requestOrderAction(): Action
{
return Action::make('requestOrderAction')
->after(function (Action $action) {
$action
->label("Request sent")
->disabled(true);
});
}
public function requestOrderAction(): Action
{
return Action::make('requestOrderAction')
->after(function (Action $action) {
$action
->label("Request sent")
->disabled(true);
});
}
Thank you very much, Satore
0 Replies
No replies yetBe the first to reply to this messageJoin