Delete button on infolist (slideover). How to close it?

Hello,

I'm having this infolist:

public static function infolist(Infolist $infolist): Infolist
    {
        return $infolist
            ->schema([
                Actions::make([
                    Action::make('delete')
                        ->label('Supprimer')
                        ->color('danger')
                        ->icon('heroicon-o-trash')
                        ->action(fn ($record) => $record->delete()),
                ]),

                Section::make('Informations générales')
                    ->schema([
                        TextEntry::make('consultationForm.name')
                            ->label('Formulaire de consultation'),
                        TextEntry::make('created_at')
                            ->label('Date de soumission')
                            ->dateTime(),
                    ])
                    ->columns(2),
                ...
            ]);
    }


It's called from my view action in my table with ->slideOver()

As it's only for a quickview and delete, I added a delete action in the infolist.
My issue is that when I delete, I see the record disappearing under the infolist, but the infolist itself stays open (with a deleted record then)

How can I force it to close after deletion ?

Thx!
Was this page helpful?