Default clickable row action
I've got a resource with both edit & view actions on the table row; I've tried overriding the default click action using the 'recordAction' method but it still defaults to view instead of edit.
Here's the table method, I can't tell if I'm being stupid/missing something glaringly obvious π
Solution:Jump to solution
```php
public static function table(Table $table): Table
{
return $table
->columns([...
3 Replies
Nevermind, figured it out. The View action was linking to a url so the default recordUrl logic was overriding recordAction and linking to a URL instead of running the action. Essentially the fix is to just pass null as the URL and it will use the action instead:
Solution
Oh wow. I'm having a silimar issue. Is there something like a default action for the row/record? However, I didn't found the recordAction() in the docs.
I would like to open the record in a Infolist Slideover when I click the row. I don't want to have the View Action Button in the Action Column. And I would like to be able to open the Edit Page with the a Button in the Action Column. The infolist() method existins in the Ressouce class, of course.
Currently, it seems only possible when I add the View Action to the actions() method. But then I get the Action in the Actions columns.