Show using modals, but edit and delete using a normal page
Hi guys, I'm new in Filament.
I have a filament resource that I want to display with different behavior, so on detail/show it's using modal but on edit and create using a page. How do I do that without removing the edit and create route on the getPages()?
If I remove them, the modal works, but the form also using modal, I want to keep the modal on the show only but keep the form for creating and editing using page.
14 Replies
Just pass
ViewAction
in $table
, since you don't have a view page, it'll display as modalI did, I put it on the ->actions([]), is there anything wrong from this?
So, if you click "view" what happens using like this?
It's visit an edit page, I already defined the infolists that only works if I delete edit and create routes
Are you sure? I just check and it's working fine tho
If I click the rows then it's pointing to "Edit" as well, but "view" display the modal
Could you show me how you wrote the table(), please?
exactly like this
Yeah it works if I click the view icon, is it possible to make it works when I clicking the row?
I am not sure this, maybe you can do like this https://filamentphp.com/docs/3.x/tables/advanced#record-urls-clickable-rows
instead of route you make to open modal (this part I don't know) π€£
ππ
Thanks for your assist man, I appreciate it!
Solution
@Vp OMG, it's simpler than I thought.
This is all we need:
Great, will keep this in mind as well