How to set the default action on table row click
Hi all!
It seems an obvious one, but I can't seem to figure out how filament determines the default action when a table row is clicked. I have 2 resources, both have View and Edit actions in the $table->actions() array, yet when clicking a row in 1 of the resources, I am taken to the edit page and the other resource goes to the view page?
Thanks!
4 Replies
If view action exists it uses that, else it uses table. you can use
->recordAction() too on the table to force one.
->recordAction() too on the table to force one.
Thanks @toeknee
When I add this, I still get taken to the view page?
->recordAction(EditAction::class)
Probably need to unset the record url
Thank you @dissto @toeknee !