mirror of
https://github.com/wahyd4/ant-design.git
synced 2026-08-09 04:46:52 +10:00
fix: Form and Mention TypeScript definition (#6268)
* Add source and options params to Form.ValidationRule.validator function As per rules section of async-validation readme: https://github.com/yiminghe/async-validator#rules * Make prefixCls optional in MentionProps interface
This commit is contained in:
committed by
Benjy Cui
parent
03504446b5
commit
720a3d30b4
@@ -52,7 +52,7 @@ export type ValidationRule = {
|
||||
/** transform a value before validation */
|
||||
transform?: (value: any) => any;
|
||||
/** custom validate function (Note: callback must be called) */
|
||||
validator?: (rule: any, value: any, callback: any) => any;
|
||||
validator?: (rule: any, value: any, callback: any, source?: any, options?: any) => any;
|
||||
};
|
||||
|
||||
export type ValidateCallback = (erros: any, values: any) => void;
|
||||
|
||||
@@ -5,7 +5,7 @@ import shallowequal from 'shallowequal';
|
||||
import Icon from '../icon';
|
||||
|
||||
export interface MentionProps {
|
||||
prefixCls: string;
|
||||
prefixCls?: string;
|
||||
suggestionStyle?: React.CSSProperties;
|
||||
suggestions?: Array<any>;
|
||||
onSearchChange?: Function;
|
||||
|
||||
Reference in New Issue
Block a user