Replies: 1 comment 1 reply
-
Hi, I haven't seen a commit or branch with a Tabs implementation, so I would like to make a proposal for the config of tabs. Instead of making it work like a Row, I think it would be nice to add a tabs property to the So instad of doing this: fields: [
{
type: 'tab',
label: 'About',
fields: [{
name: "name",
label: "Full Name",
required: true,
localized: false,
type: "text",
index: true
},
{
name: "role",
label: "User Role",
required: true,
localized: false,
type: "select",
options: roles,
},
]
},
} I feel a much cleaner implementation would be to set a tabs config property like this: fields: [...],
tabs: [
{
name: "main",
label: "Info",
default: true
fields: ['name', 'role', 'email', 'privacy_consent']
},
{
name: "subscription",
label: "Subscription",
condition: (data, sibilingData) => data.subscription_status !== undefined,
fields: ['subscription_type', 'subscription_status', 'subscription_start', 'subscription_end', "payments", "coupons_applied"]
},
{
// Set up the sidebar here so all position config can be in one place
name: "sidebar",
fields: ['picture']
}
] For rows and groups, it would be as easy as adding a name property to them and add them to the tabs in the fields property. Why?Because I think that with a combination of Tabs, Rows, and Groups the fields array will become convoluted, with unnecessary nesting. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Design and build a UI-only Tabs field type, which will allow developers to better organize their admin UI fields into a tabbed interface. Presentational only.
Implementation Detail
Will operate similarly to the existing
row
field type and have no effect on data whatsoever.Potential Breaking Changes
None
Effort
Medium
Beta Was this translation helpful? Give feedback.
All reactions