Open view modal on table row click without `ViewAction` in `recordActions()`

Hi all I'm trying to make clicking on a table row open the view modal, without including the View button on the row. Clicking the row works fine when ViewAction is in recordActions(), but if I remove it from there and do this:
->recordAction(ViewAction::class)
->recordUrl(null)
->recordAction(ViewAction::class)
->recordUrl(null)
I get a Unable to call component method. Public method [view] not found on component exception. Any ideas? I'm using v4
5 Replies
binaryfire
binaryfireOP3mo ago
Bump
Matthew
Matthew3mo ago
Not got onto v4 yet, but in v3:
ViewAction::make()
->label('')
->icon('')
->extraAttributes(['class' => 'hidden'])
ViewAction::make()
->label('')
->icon('')
->extraAttributes(['class' => 'hidden'])
binaryfire
binaryfireOP3mo ago
Thanks, yeah that’s what I’m doing atm. But I’d rather not render the extra html if I can avoid it.
Lirux
Lirux3mo ago
GitHub
Open record in modal without viewaction · filamentphp filament · ...
When I add a ViewAction to my table a new column is created that gives me the opportunity to open the record in a modal. But I would rather like the row's click to trigger the modal popup and t...
binaryfire
binaryfireOP3mo ago
@Lirux Ah right ok. Thanks for the link.

Did you find this page helpful?