Repository URL to install this package:
Version:
0.2.0-dev.38 ▾
|
import { UseControllerProps, UseFormProps } from 'react-hook-form';
import { ControlledFieldPropsOptions } from '../../utils/index.types';
export default function useInnerForm({ defaultValues, ...rest }: UseFormProps): ({
watch: import("react-hook-form").UseFormWatch<import("react-hook-form").FieldValues>;
getValues: import("react-hook-form").UseFormGetValues<import("react-hook-form").FieldValues>;
getFieldState: import("react-hook-form").UseFormGetFieldState<import("react-hook-form").FieldValues>;
setError: import("react-hook-form").UseFormSetError<import("react-hook-form").FieldValues>;
clearErrors: import("react-hook-form").UseFormClearErrors<import("react-hook-form").FieldValues>;
setValue: import("react-hook-form").UseFormSetValue<import("react-hook-form").FieldValues>;
trigger: import("react-hook-form").UseFormTrigger<import("react-hook-form").FieldValues>;
formState: import("react-hook-form").FormState<import("react-hook-form").FieldValues>;
resetField: import("react-hook-form").UseFormResetField<import("react-hook-form").FieldValues>;
reset: import("react-hook-form").UseFormReset<import("react-hook-form").FieldValues>;
handleSubmit: import("react-hook-form").UseFormHandleSubmit<import("react-hook-form").FieldValues>;
unregister: import("react-hook-form").UseFormUnregister<import("react-hook-form").FieldValues>;
control: import("react-hook-form").Control<import("react-hook-form").FieldValues, any>;
setFocus: import("react-hook-form").UseFormSetFocus<import("react-hook-form").FieldValues>;
register: (name: string, options: Partial<{
required: string | import("react-hook-form").ValidationRule<boolean>;
min: import("react-hook-form").ValidationRule<string | number>;
max: import("react-hook-form").ValidationRule<string | number>;
maxLength: import("react-hook-form").ValidationRule<number>;
minLength: import("react-hook-form").ValidationRule<number>;
pattern: import("react-hook-form").ValidationRule<RegExp>;
validate: import("react-hook-form").Validate<any> | Record<string, import("react-hook-form").Validate<any>>;
valueAsNumber: boolean;
valueAsDate: boolean;
value: any;
setValueAs: (value: any) => any;
shouldUnregister?: boolean | undefined;
onChange?: ((event: any) => void) | undefined;
onBlur?: ((event: any) => void) | undefined;
disabled: boolean;
deps: string | string[];
}>) => {
onChange: import("react-hook-form").ChangeHandler;
onBlur: import("react-hook-form").ChangeHandler;
name: string;
min?: string | number | undefined;
max?: string | number | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
pattern?: string | undefined;
required?: boolean | undefined;
disabled?: boolean | undefined;
inputRef: import("react-hook-form").RefCallBack;
};
} | ((name: UseControllerProps['name'], options: ControlledFieldPropsOptions) => import("../../utils/index.types").ControlledFieldProps))[];