Add support for virtual fields nested in arrays / blocks #12932
Replies: 2 comments 1 reply
-
|
Any updates on that? Or someone has found a workaround? |
Beta Was this translation helpful? Give feedback.
-
|
I have a use case for this which I would have assumed is fairly common—custom row labels on array rows. I have an an array field, and each item in the array has a relationship to another collection. I'd like each row in the array to display a field from that relationship as it's title. The workaround is rather than make them virtual, to actually store the title in the database and keep it updated using hooks, however I'd prefer not to have to change the database for a trivial display requirement in the admin. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As per this issue thread, I have run into a limitation with virtual fields in that they do not work as intended when nested in arrays / blocks. On the surface this may seem like a rather niche use-case, however I think it would extend the functionality of relationships dramatically. In the above mentioned issue I go into a use case for this, but suffice to say, enabling filtering of related content in the cms based on relationships would prove a massive benefit for large quantities of data.
Given virtual fields are the way to access props, I believe this is a valuable addition to it's functionality.
Keen to hear any thoughts or alternative approaches though!
Beta Was this translation helpful? Give feedback.
All reactions