ID Field as clickable link to open detail action
ID Field as clickable link to open detail action.
Hi. Are you checking the permissions to view the Details page? Maybe it is disabled?
Thanks for this proposal. I like this feature and this was on my TODO list ... but I'd like the implementation to be different. I want to add a ->rowAction() method or something like that where you can define which is the action executed when clicking on the row. If you don't configure it, it links by default to edit or detail (the first action that it's enabled and you have permission to execute).
Couple of questions regarding that:
- The
->rowAction()would be forCrudinconfigureCrud, correct? - the whole
trshould then be clickable, excluding any links of buttons, correct?- Follow up to this: Do you know a proper way to link on the whole tr? Should that be made with a data-href and js to make it work?
- Should it really be automatically working or should it be opt-in?
Should I convert the current logic with a link to be more generic so that any field can be rendered as a link but you then need to provide the action or a url?
WDYT @javiereguiluz ?
Somehow related to this PR or the table row action: What about implementing both but make this PR more generic to allow create a link on any field (which does not create a link by itself like AssociationField? The link can either be an action, a route or a uri. WDYT @javiereguiluz ?
Nice! I was planning on doing this PR myself but it's nice to see I'm not the only one wanting linkable ID. In the meantime, I put together a quick workaround directly in Twig: https://blog.eexit.net/link-id-fields-in-easyadmin/
I look forward this PR to being merged 🙏🏻 Thanks!
See #5331 for a more generic version.
Let's close this one in favor of a more generic solution like the one proposed in #5331. Thanks.