acud
Version:
acg react 组件库
18 lines (17 loc) • 758 B
TypeScript
/**
* @file wrap form with advanced features
* @author chenqiang(chenqiang03)
*/
import * as React from 'react';
import { FormInstance as RcFormInstance } from 'rc-field-form';
import { ScrollOptions, NamePath, InternalNamePath } from '../interface';
export interface FormInstance<Values = any> extends RcFormInstance<Values> {
scrollToField: (name: NamePath, options?: ScrollOptions) => void;
/** @private Internal usage. Do not use in any production deployment. */
__INTERNAL__: {
name?: string;
itemRef: (name: InternalNamePath) => (node: React.ReactElement) => void;
};
getFieldInstance: (name: NamePath) => any;
}
export default function useForm<Values = any>(form?: FormInstance<Values>): [FormInstance<Values>];