Auto-Closing extraModalFooterAction is buggy

Hi everyone. I have defined headerActions on an EditRecord page that should call a modal form. In the footer there are not the standard actions, but a kind of paging function and separate actions for saving and closing. For this I use the function extraModalFooterActions(). For closing, I create the following action in extraModalFooterActions():
// ...
$actions[] = $action->makeModalAction('cancel')
->icon('heroicon-m-no-symbol')
->label('')
->color('gray')
->close();
// ...
return $actions;
// ...
// ...
$actions[] = $action->makeModalAction('cancel')
->icon('heroicon-m-no-symbol')
->label('')
->color('gray')
->close();
// ...
return $actions;
// ...
To process the form and save it in the database, ->action() with makeModelAction() apparently has no effect. So I create the action as follows:
// ...
$actions[] = Action::make('operate')
->label('Operate')
->action(fn(array $data) => callMyOperationFunction($data));
// ...
// ...
$actions[] = Action::make('operate')
->label('Operate')
->action(fn(array $data) => callMyOperationFunction($data));
// ...
This works well so far. Now I want the data to be processed after clicking on the “Operate” button and the modal to be closed. So far I have always achieved this as follows:
// ...
$actions[] = Action::make('operate')
->label('Operate')
->action(fn(array $data) => callMyOperationFunction($data))
->close();
// ...
// ...
$actions[] = Action::make('operate')
->label('Operate')
->action(fn(array $data) => callMyOperationFunction($data))
->close();
// ...
This has not been working properly for some time now. As soon as I click on the button, the data is processed and the modal is closed. But after a few seconds the black, semi-transparent area appears again over the whole screen (as with the modal window), and my GUI is not operable. Unfortunately, I can't say exactly when this problem started. Can anyone help me? Many thanks in advance! JN
1 Reply
johny7
johny72w ago
No one who can help me here? Or is this a bug?
Want results from more Discord servers?
Add your server