Update widget documentation

This commit is contained in:
Daniel Lautzenheiser
2022-11-02 15:42:21 -04:00
parent fdd51aefa3
commit 6de5363f12
23 changed files with 618 additions and 332 deletions

View File

@ -586,14 +586,13 @@ export interface ListField extends BaseField {
allow_add?: boolean;
collapsed?: boolean;
summary?: string;
minimize_collapsed?: boolean;
label_singular?: string;
fields?: Field[];
max?: number;
min?: number;
add_to_top?: boolean;
types?: ObjectField[];
typeKey?: string;
type_key?: string;
}
export interface MapField extends BaseField {

View File

@ -32,4 +32,6 @@ export function validateMinMax(
} else if (isNumber(max) && length > max) {
return minMaxError('rangeMax');
}
return false;
}

View File

@ -3,7 +3,6 @@ export default {
allow_add: { type: 'boolean' },
collapsed: { type: 'boolean' },
summary: { type: 'string' },
minimize_collapsed: { type: 'boolean' },
label_singular: { type: 'string' },
i18n: { type: 'boolean' },
min: { type: 'number' },

View File

@ -1,7 +1,7 @@
import type { ListField, ObjectField, ObjectValue } from '../../interface';
export const TYPES_KEY = 'types';
export const TYPE_KEY = 'typeKey';
export const TYPE_KEY = 'type_key';
export const DEFAULT_TYPE_KEY = 'type';
export function getTypedFieldForValue(