Open Edit modal from Action Group
I have a Filament table in my resource. When I click on a row, a View modal opens. This is because of the recordUrl and recordAction in below snippet.
When I click on an 'edit' action in the action group, it opens the edit page but I also want it to open as an (edit) modal. How can I do this?
->actions([
ActionGroup::make([
Tables\Actions\EditAction::make(),
Tables\Actions\ViewAction::make() ,
])
->button()
->icon('heroicon-m-ellipsis-horizontal')
])
->recordUrl(null)
->recordAction(Tables\Actions\ViewAction::class);
Note: when I change the (Tables\Actions\ViewAction::class);
to (Tables\Actions\EditAction::class);
it opens indeed the edit modal. But I don't want it to open when clicking a row, I want it to open when the Edit is clicked in the ActionGroup.2 Replies
Solution
Remove the editPage in the getPages() method of your resource
Many thanks. Works!