makeModalSubmitAction arguments are empty?

I am trying to use the above method to implment a 'save & create another' action however the arguments are always empty even though I am passing it. I took the the example straight from the documentation, code below:

->extraModalFooterActions(fn (Action $action): array => [
    // TODO: Get argument to be received by action to identify when modal should be reloaded
    $action->makeModalSubmitAction('createAnother', arguments: ['another' => true]),
])
->action(function (array $arguments) {
    if ($arguments['another'] ?? false) {
        // Reset the form and don't close the modal
        dd('another');
    }

    // ... other form logic
});


Not really sure why $arguments is always empty.
Was this page helpful?