First Action Modal doesn't close

I've implemented a delete action for the editOptionForm like so:

                Forms\Components\Select::make('location_id')
                    ->label('Location')
                    ->relationship('location', 'name')
                    ->required()
                    ->searchable()
                    ->preload()
                    ->createOptionForm([
                        Forms\Components\TextInput::make('name')
                            ->required()
                            ->maxLength(255),
                    ])
                    ->editOptionForm([
                        Forms\Components\TextInput::make('name')
                            ->required()
                            ->maxLength(255),
                    ])
                    ->editOptionAction(fn (Forms\Components\Actions\Action $action, $record) => $action
                        ->extraModalFooterActions([
                            DeleteAction::make()
                                ->record($record)
                                ->cancelParentActions(),
                        ]),
                    ),


But the confirmation modal for the delete action is behind the edit modal, because the edit modal doesn't close. Even when using cancelParentActions.

How can I make it, so the edit modal closes?

Thank you!
Was this page helpful?