Skip to content

feat: add renderAsLinkToEntity option to TextField#7490

Open
maks-oleksyuk wants to merge 2 commits intoEasyCorp:5.xfrom
maks-oleksyuk:feat/render-as-link-to-entity
Open

feat: add renderAsLinkToEntity option to TextField#7490
maks-oleksyuk wants to merge 2 commits intoEasyCorp:5.xfrom
maks-oleksyuk:feat/render-as-link-to-entity

Conversation

@maks-oleksyuk
Copy link
Contributor

close #6989

@pfpro
Copy link
Contributor

pfpro commented Mar 7, 2026

"This option only has effect on the index page."

Is there any specific reason you wont support the detail page as well?

@maks-oleksyuk
Copy link
Contributor Author

@pfpro the main idea here is to enable displaying text as a link to the detail page. If this display is allowed on the detail page itself, it will be a recursive link, which I don't see the point of

@a-r-m-i-n
Copy link
Contributor

It would be also very nice, if you could set the link to edit action instead of detail. At least, when no detail action is configured. But it would even better, if I could define the link target on my own.

@maks-oleksyuk
Copy link
Contributor Author

@a-r-m-i-n that sounds good, but it seems to go out of the current scope

@a-r-m-i-n
Copy link
Contributor

You add a function to render a link with a hardcoded target (detail action). If making the target configurable is out of the current scope, the scope is maybe to small 😉

Also, in my opinion the name "renderAsLinkToEntity" is too unspecific. What does "toEntity" mean?

How about providing two methods "renderAsLinkToDetailAction" and "renderAsLinkToEditAction".

@maks-oleksyuk
Copy link
Contributor Author

I think that if we add the ability to configure the target for links right now, it might open up a lot more details that we’ll want to configure—for example, the _target attribute, display variations, and I’m sure there will be others—so I’m in favor of keeping this PR focused on a small scope 🙃

I also like the suggestion for more specific names, but that might also require more flexible settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add method to render as link to entity

3 participants