The common config of nice form.

interface NiceFormConfig {
    adapters: NiceFormAdapter[];
    addAdapter: ((adapter) => void);
    defaultViewWidget: string | ReactComponent;
    defaultWidget: string | ReactComponent;
    defineWidget: ((name, widget, metaConverter?) => void);
    getWidgetDef: ((widget) => {
        metaConverter?: FieldMetaConverter;
        widget: string | ReactComponent;
    });
    metaConverters: ((meta) => NormalizedFormMeta)[];
    renderField?: ((param0) => null | ReactElement<any, string | JSXElementConstructor<any>>);
    renderFieldWithoutLabel?: ((__namedParameters) => null | ReactElement<any, string | JSXElementConstructor<any>>);
    widgetMap: NiceFormWidgetMap;
}

Properties

adapters: NiceFormAdapter[]
addAdapter: ((adapter) => void)

Add an adapter to the nice form. Nice form could have multiple adapters to provide different features. For example, some adapter supports an UI framework, some adapter supports a form state management framework.

Type declaration

Returns

defaultViewWidget: string | ReactComponent

The default widget component or widget id for fields in view mode.

defaultWidget: string | ReactComponent

The default widget component or widget id for fields in edit mode.

defineWidget: ((name, widget, metaConverter?) => void)

Define a widget so that you can use a string id as field widget. Also you can provide a meta converter to convert user input meta to the meta that the widget needs.

Type declaration

Returns

getWidgetDef: ((widget) => {
    metaConverter?: FieldMetaConverter;
    widget: string | ReactComponent;
})

Internal usage only.

Type declaration

Returns

metaConverters: ((meta) => NormalizedFormMeta)[]

Internal usage only.

Type declaration

renderField?: ((param0) => null | ReactElement<any, string | JSXElementConstructor<any>>)

Internal usage only.

Type declaration

Returns

renderFieldWithoutLabel?: ((__namedParameters) => null | ReactElement<any, string | JSXElementConstructor<any>>)

Type declaration

Internal usage only.

Generated using TypeDoc