Comparing version 0.0.7 to 0.0.8
@@ -88,7 +88,6 @@ 'use strict'; | ||
var checkResult = this.handleFieldCheck(value, checkTrigger === 'change', function () { | ||
onFieldChange(name, value); | ||
onChange && onChange(value, event); | ||
}); | ||
var checkResult = this.handleFieldCheck(value, checkTrigger === 'change'); | ||
this.setState({ checkResult: checkResult, value: value }); | ||
onFieldChange(name, value); | ||
onChange && onChange(value, event); | ||
} | ||
@@ -95,0 +94,0 @@ }, { |
@@ -176,2 +176,7 @@ 'use strict'; | ||
} | ||
}, { | ||
key: 'cleanErrors', | ||
value: function cleanErrors() { | ||
this.setState({ errors: {} }); | ||
} | ||
@@ -184,3 +189,3 @@ /** | ||
key: 'handleFieldError', | ||
value: function handleFieldError(name, error, callback) { | ||
value: function handleFieldError(name, error) { | ||
var _props3 = this.props, | ||
@@ -195,3 +200,2 @@ onError = _props3.onError, | ||
onCheck && onCheck(errors); | ||
callback && callback(); | ||
}); | ||
@@ -206,3 +210,3 @@ } | ||
key: 'handleFieldSuccess', | ||
value: function handleFieldSuccess(name, callback) { | ||
value: function handleFieldSuccess(name) { | ||
var onCheck = this.props.onCheck; | ||
@@ -213,3 +217,2 @@ | ||
onCheck && onCheck(errors); | ||
callback && callback(); | ||
}); | ||
@@ -216,0 +219,0 @@ } |
{ | ||
"name": "form-lib", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Form component for React", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -22,3 +22,3 @@ # form-lib | ||
详细的使用,查看示例代码,和 API文档。 | ||
详细的使用,查看示例代码,和 [API文档](https://rsuitejs.com/form-lib/)。 | ||
@@ -25,0 +25,0 @@ ------ |
31763
579