2016-12-06 40 views

回答

0

如縮減形式docs所包含的那樣,redux形式接受運行onBlurasyncValidate回調。語法如下所示:

export default reduxForm({ 
    form: 'asyncValidation', // a unique identifier for this form 
    asyncValidate:() => { /* place your custom event here */ }, 
    asyncBlurFields: [ 'username', 'otherFieldsYouWantToAttachTheBlurEventTo' ] 
})(AsyncValidationForm) 

您的操作可以在asyncValidate()處理程序中調度。