Make virtual/computed fields easier to implement #4419
Replies: 1 comment
-
I agree, the "official solution" presented in https://payloadcms.com/posts/blog/learn-how-virtual-fields-can-help-solve-common-cms-challenges which involves using From https://payloadcms.com/docs/fields/relationship#linking-virtual-fields-with-relationships it seems that it is also possible to directly define a field as I think it would be great if one could also pass a function to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, implementing virtual fields involves creating two hooks, one for the rendering and one for preventing it from being saved to the database. This isn't very ergonomic for the developer.
There should be a way to declare virtual fields, as well as retain their types (so it should be a property on existing fields, not a brand new field type)
Beta Was this translation helpful? Give feedback.
All reactions