Combination Record action with Action url not working

When a table has an action that opens a url, the "recordAction" to use this action as default action when the full row is clicked is not working.
->recordAction('open')
->actions([
Action::make('open')->url(function (Model $someModel): string {
return SomeModelResource::getUrl(ContextEnum::EDIT->value, ['record' => $someModel]);
}),
])
->recordAction('open')
->actions([
Action::make('open')->url(function (Model $someModel): string {
return SomeModelResource::getUrl(ContextEnum::EDIT->value, ['record' => $someModel]);
}),
])
The action above works on its own, so when you click the action the url is opened. However, when I click the full row, this action is not triggered. When the action would have an ->action(), the recordAction functionality does work correctly. Anyone else experienced this or found a workaround? I may repeat the url closure into ->recordUrl instead of recordAction, but I don't like this repetition πŸ™‚
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?