Only of the actions in ActionGroup can be opened

Post-upgrade v3, idk why but clicking an action one after another doesn't display the modal. I needed to refresh the page every time to open one
2 Replies
Patrick Boivin
Can you post a quick screen capture of the issue? Do you see any errors in the browser console?
KeyMe
KeyMeOP2y ago
no visible error, heres some code example
Actions\ActionGroup::make([
Action::make('reviseUserDetail')
->fillForm($this->record->attributesToArray())
->action(function (array $data): void {
$this->record->update($data);
$this->fillForm();
})
->form([
Grid::make(1)->schema(OrderResource::getCustomerDetails())
]),

Action::make('requestReviseOrder')
->fillForm([
'remarks' => $this->record->training()->pluck('remarks')
])
->action(function (array $data): void {
$order = $this->record;
$this->mutateFormDataBeforeFill([
$data['remarks'] = $data['remarks'] . ' [' .
now()->toFormattedDayDateString() . ']'
]);
$order->training()->update(['remarks' => $data['remarks']]);
$this->fillForm();

Notification::make()
->title('Request sent!')
->success()
->send();
})
->form([
Textarea::make('remarks')
]),
Actions\ActionGroup::make([
Action::make('reviseUserDetail')
->fillForm($this->record->attributesToArray())
->action(function (array $data): void {
$this->record->update($data);
$this->fillForm();
})
->form([
Grid::make(1)->schema(OrderResource::getCustomerDetails())
]),

Action::make('requestReviseOrder')
->fillForm([
'remarks' => $this->record->training()->pluck('remarks')
])
->action(function (array $data): void {
$order = $this->record;
$this->mutateFormDataBeforeFill([
$data['remarks'] = $data['remarks'] . ' [' .
now()->toFormattedDayDateString() . ']'
]);
$order->training()->update(['remarks' => $data['remarks']]);
$this->fillForm();

Notification::make()
->title('Request sent!')
->success()
->send();
})
->form([
Textarea::make('remarks')
]),
if i click open the reviseUserdetail action, i'd have to reload the page before able to open another action modal. Tried removing the actiongroup, still the same

Did you find this page helpful?