Nested modal actions inside Infolist action modal not opening

Hey I’ve encountered an issue when using modal actions inside another modal, specifically within an Infolist action on a ViewRecord page. The action is defined inside an Infolist schema (in a Section ) on a viewRecord page. The action opens a modal — this works fine. In that modal’s footer, I have three other actions (buttons) that should each open another modal (like confirmation dialogs or schemas). The problem: When I click those footer actions: The button loading icon flases and nothing hapens No error in the console, No DD, no nothing If i move the exact same component to the getHeaderActions() on the same ViewRecord page, things works as expected. Here is my code
class GeneratePVDocument extends Action
{
public static function getDefaultName(): ?string
{
return 'xxx';
}

protected function setUp(): void
{
parent::setUp();

$this->slideOver();

$this->schema(function (): array {


return [
// ... Some schema components
];
});

$this->extraModalFooterActions(fn (Action $action): array => [
$action->makeModalAction('namirial'),
$action->makeModalAction('pad'),
$action->makeModalAction('printed')
->label('Semnează Fizic')
->action(function (Reservation $record, GenerateContentAction $gtb, array $data): void {
dd($data);
}),
]);
}

}
class GeneratePVDocument extends Action
{
public static function getDefaultName(): ?string
{
return 'xxx';
}

protected function setUp(): void
{
parent::setUp();

$this->slideOver();

$this->schema(function (): array {


return [
// ... Some schema components
];
});

$this->extraModalFooterActions(fn (Action $action): array => [
$action->makeModalAction('namirial'),
$action->makeModalAction('pad'),
$action->makeModalAction('printed')
->label('Semnează Fizic')
->action(function (Reservation $record, GenerateContentAction $gtb, array $data): void {
dd($data);
}),
]);
}

}
Does any of you had the same issue? Am i doing something wrong?
4 Replies
awcodes
awcodes2mo ago
I think it’s because you are reusing the injected action in the callback instead of defining each action as a new instance. I might be wrong though. https://filamentphp.com/docs/4.x/actions/modals#opening-another-modal-from-an-extra-footer-action
Eugen Pașca
Eugen PașcaOP2mo ago
Not working. I tried the example, and the issue persists. When the action is placed inside the infolist, the nested modal doesn`t open. It works just fine when the same action is added to the header
awcodes
awcodes2mo ago
I know in the form schema actions have to be wrapped in an Actions component, maybe info lists needs the same.? But it’s the modal footer. 🤔
Eugen Pașca
Eugen PașcaOP2mo ago
Nope, weirdly enough it does not work on a form either.
just tried with a new blank Laravel application, just FilamentPhp4 installed - same thing (Link to Infolist schema) submitted a bug report for this - https://github.com/filamentphp/filament/issues/18204 if i am doing something wrong, please let me know 🫣
GitHub
Nested modal actions don’t open when the parent action is inside ...
Package filament/filament Package Version v4.1.7 Laravel Version v12.33.0 Livewire Version v3.6.4 PHP Version PHP 8.4.8 Problem description Nested modal actions defined via extraModalFooterActions(...

Did you find this page helpful?