#How to set the default action on table row click

6 messages · Page 1 of 1 (latest)

chrome flume
#

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!

wanton chasm
#

If view action exists it uses that, else it uses table. you can use
->recordAction()
too on the table to force one.

chrome flume
#

Thanks @wanton chasm

#

When I add this, I still get taken to the view page?

#

->recordAction(EditAction::class)

silk fractal
#

Probably need to unset the record url

$table
    ->recordUrl(null)
    ->recordAction(EditAction::class)