material-form-builder
Version:
FormBuilder For React.js
28 lines (27 loc) • 1 kB
TypeScript
export interface InputActions<ValueType = any> {
setValue: (data: ValueType) => Promise<ValueType>;
getValue: () => Promise<ValueType>;
clear: () => Promise<ValueType>;
click: () => Promise<any>;
focus: () => Promise<any>;
blur: () => Promise<any>;
copy?: () => Promise<any>;
}
export interface BaseInput<ValueType = any> {
selector: string;
required?: boolean;
/**
* @default true
*/
visible?: ((e: any) => boolean | undefined) | boolean;
wrapper?: (children: JSX.Element, actions: InputActions<ValueType>) => JSX.Element;
onChangeValue?: (value: ValueType) => void;
getMutator?: (value: any) => any;
setMutator?: (value: any) => any;
formatter?: (value: any) => any;
_call_parent_for_update?: () => Promise<boolean>;
ref?: any;
updateListener?: Array<string | null | number | undefined | boolean> | {
[key: number | string]: string | null | number | undefined | boolean;
};
}