Optional programmatic default blockName field #4648
Replies: 3 comments
-
Beta Was this translation helpful? Give feedback.
-
No one interested in this? I think this feature is crucial for the usability and clarity of the CMS. Blocks are often used to create complex structures, and the information identifying a block is often already contained within the internal fields. We also have several use cases where it is useful to generate a blockName from multiple internal fields, but people either don't use it or are bored with re-entering the same information. In my opinion, this change would add a lot of value for the end user. What do you think? |
Beta Was this translation helpful? Give feedback.
-
It's super useful, for example in sanity you can do that. https://www.sanity.io/docs/previews-list-views |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be great to be able to define a programmatic default
blockName
pattern, usage similar toadmin.components.RowLabel
.My thinking is that a block's
blockName
would default to the generated output of a given function while the input is empty - automatically updating each time the block's data updates.blockName
could still be overridden in the UI, which would break the link between it and the generator function. When cleared the input is cleared, it would default back to the provided function output.Example:
Beta Was this translation helpful? Give feedback.
All reactions