UNPKG

@s-chat/form-manager

Version:
28 lines 1.38 kB
import { UseFormManagerOptions } from '../context/FormManager'; import type { FormSchema, UniversalValuesType } from '../types/FormManager'; export declare const useFormManager: <ValidDataType = UniversalValuesType>(fields: FormSchema<ValidDataType>, hookOptions?: UseFormManagerOptions) => { fields: { field: FormSchema<ValidDataType>[keyof ValidDataType]; name: keyof ValidDataType; label: string; value: ValidDataType[keyof ValidDataType] | undefined; valueRef: import("react").MutableRefObject<ValidDataType[keyof ValidDataType] | undefined>; isError: boolean; errorMessage: string; setValue: import("react").Dispatch<import("react").SetStateAction<ValidDataType[keyof ValidDataType] | undefined>>; setType: import("react").Dispatch<import("react").SetStateAction<string>>; setErrorMessage: import("react").Dispatch<import("react").SetStateAction<string>>; originalType: string; bind: { name: keyof ValidDataType; id: keyof ValidDataType; type: string; onChange: (...props: any) => void; }; }[]; formFieldObject: ValidDataType; validateForm: () => ValidDataType | void; resetForm: () => void; bulkUpdateForm: (updateData: Record<string, any>) => void; }; //# sourceMappingURL=useFormManager.d.ts.map