useForm.d.ts 531 B

123456789
  1. import type { FormInstance as RcFormInstance } from 'rc-field-form';
  2. import type { NamePath, ScrollOptions } from '../interface';
  3. export interface FormInstance<Values = any> extends RcFormInstance<Values> {
  4. scrollToField: (name: NamePath, options?: ScrollOptions) => void;
  5. focusField: (name: NamePath) => void;
  6. getFieldInstance: (name: NamePath) => any;
  7. }
  8. export declare function toNamePathStr(name: NamePath): string;
  9. export default function useForm<Values = any>(form?: FormInstance<Values>): [FormInstance<Values>];