mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +08:00
Form: add missing type definition for form create option validateMessages
(Docs for validateMessages had been added in rev 16133aac65
)
This commit is contained in:
parent
619b0ed628
commit
ee0a7ce3bb
@ -9,10 +9,20 @@ import FormItem from './FormItem';
|
||||
import { FIELD_META_PROP, FIELD_DATA_PROP } from './constants';
|
||||
import { Omit } from '../_util/type';
|
||||
|
||||
type FormCreateOptionMessagesCallback = (...args: any[]) => string;
|
||||
|
||||
interface FormCreateOptionMessages {
|
||||
[messageId: string]:
|
||||
| string
|
||||
| FormCreateOptionMessagesCallback
|
||||
| FormCreateOptionMessages;
|
||||
}
|
||||
|
||||
export interface FormCreateOption<T> {
|
||||
onFieldsChange?: (props: T, fields: Array<any>, allFields: any, add: string) => void;
|
||||
onValuesChange?: (props: T, changedValues: any, allValues: any) => void;
|
||||
mapPropsToFields?: (props: T) => void;
|
||||
validateMessages?: FormCreateOptionMessages;
|
||||
withRef?: boolean;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user