minishouyin/node_modules/antd/lib/form/hooks/useForm.d.ts

10 lines
531 B
TypeScript
Raw Normal View History

2025-11-12 11:35:57 +08:00
import type { FormInstance as RcFormInstance } from 'rc-field-form';
import type { NamePath, ScrollOptions } from '../interface';
export interface FormInstance<Values = any> extends RcFormInstance<Values> {
scrollToField: (name: NamePath, options?: ScrollOptions) => void;
focusField: (name: NamePath) => void;
getFieldInstance: (name: NamePath) => any;
}
export declare function toNamePathStr(name: NamePath): string;
export default function useForm<Values = any>(form?: FormInstance<Values>): [FormInstance<Values>];