feat/add support for setting collapsable fields (array, block, collapsable… (#1057)
Co-authored-by: liorix <liorix@gmail.com> Co-authored-by: Elliot DeNolf <denolfe@gmail.com>
This commit is contained in:
@@ -11,6 +11,7 @@ export const baseAdminFields = joi.object().keys({
|
||||
style: joi.object().unknown(),
|
||||
className: joi.string(),
|
||||
readOnly: joi.boolean().default(false),
|
||||
initCollapsed: joi.boolean().default(false),
|
||||
hidden: joi.boolean().default(false),
|
||||
disabled: joi.boolean().default(false),
|
||||
condition: joi.func(),
|
||||
|
||||
@@ -184,6 +184,9 @@ export type CollapsibleField = Omit<FieldBase, 'name'> & {
|
||||
type: 'collapsible';
|
||||
label: string
|
||||
fields: Field[];
|
||||
admin?: Admin & {
|
||||
initCollapsed?: boolean | false;
|
||||
}
|
||||
}
|
||||
|
||||
export type TabsAdmin = Omit<Admin, 'description'>;
|
||||
@@ -327,6 +330,9 @@ export type ArrayField = FieldBase & {
|
||||
maxRows?: number;
|
||||
labels?: Labels;
|
||||
fields: Field[];
|
||||
admin?: Admin & {
|
||||
initCollapsed?: boolean | false;
|
||||
}
|
||||
}
|
||||
|
||||
export type RadioField = FieldBase & {
|
||||
@@ -352,6 +358,10 @@ export type BlockField = FieldBase & {
|
||||
blocks: Block[];
|
||||
defaultValue?: unknown
|
||||
labels?: Labels
|
||||
admin?: Admin & {
|
||||
initCollapsed?: boolean | false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export type PointField = FieldBase & {
|
||||
|
||||
Reference in New Issue
Block a user