A group field with no heading #1593
gamellis
started this conversation in
Feature Requests & Ideas
Replies: 1 comment 1 reply
-
Ok if I'm following along, since your labels are static it sounds like you could return your const makeYield = (heading) => ({
name: 'yield',
label: heading,
type: 'group',
admin: {
hideGutter: true
},
fields: [
{
name: 'servings',
label: 'Number of servings',
type: 'number',
min: 1
}
]
}) Then use it in your config (no need for UI fields): {
makeYield('proximities'),
...
} Would something like this work for you? Otherwise if you need dynamic labels, we could potentially build something similar the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using a space character to hide the group heading, which works 😬 but feels a little icky. It would be great to add a group and change the data model of a collection without needing a heading, and I have created a custom field UI component to add a heading where I don't what a group in the data but would like to break fields up.
Examples:
A little future-proofing the data with a yield object that wraps a single field.
This data set should not be broken into groups for the API but is difficult for people to scan when not broken into groups.
Beta Was this translation helpful? Give feedback.
All reactions