Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Dave Wize's avatar

Open filament edit form as modal, while keeping the edit route active

I have this action

            Actions\EditAction::make()
                ->icon('heroicon-o-pencil-square')
                ->color('warning')
                ->iconButton()
                ->slideOver(),

but I want it to open as a modal; I know that if I delete the edit route on the resource, it will turn into a modal, but I do want to keep the edit route for some other reasons.

How can I configure this to open as a modal?

0 likes
4 replies
Dave Wize's avatar

The way I managed to make this work was to rename the edit route to custom-edit instead of edit.

But it doesn't feel right

Any better workaround is appreciated

tisuchi's avatar

@dave wize If you provide modal instead of slideOver(), doesn't it work?

             Actions\EditAction::make()
                ->icon('heroicon-o-pencil-square')
                ->color('warning')
                ->iconButton()
                ->modal(),
eugenefvdm's avatar

@tisuchi On my system when I simply append ->modal() to the stock EditAction the record doesn't open in a modal.

Please or to participate in this conversation.