ac-gridcn-refer-field
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -106,3 +106,3 @@ 'use strict'; | ||
_this.setState({ value: value, flag: status == 'edit' }, function () { | ||
_this.setState({ value: value, flag: status == 'edit' && _this.changeed }, function () { | ||
_this.validate(); | ||
@@ -193,2 +193,10 @@ }); | ||
ReferField.prototype.componentDidMount = function componentDidMount() { | ||
this.changeed = false; | ||
}; | ||
ReferField.prototype.componentDidUpdate = function componentDidUpdate() { | ||
this.changeed = true; | ||
}; | ||
/** | ||
@@ -195,0 +203,0 @@ * 有输入值改变的回调 |
@@ -0,1 +1,6 @@ | ||
<a name="0.0.14"></a> | ||
## [0.0.14](https://github.com/tinper-bee/ac-gridcn-refer-field/compare/v0.0.13...v0.0.14) (2020-05-13) | ||
<a name="0.0.13"></a> | ||
@@ -2,0 +7,0 @@ ## [0.0.13](https://github.com/tinper-bee/ac-gridcn-refer-field/compare/v0.0.12...v0.0.13) (2020-04-20) |
{ | ||
"name": "ac-gridcn-refer-field", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "GridcnReferField ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -89,2 +89,10 @@ /** | ||
} | ||
componentDidMount(){ | ||
this.changeed = false; | ||
} | ||
componentDidUpdate(){ | ||
this.changeed = true; | ||
} | ||
afterValueChange = (data) => { | ||
@@ -95,2 +103,3 @@ if(Array.isArray(data.value) && data.value.length === 0) return;//解决问题树参照根节点问题 | ||
/** | ||
@@ -104,3 +113,3 @@ * 有输入值改变的回调 | ||
//处理是否有修改状态改变、状态同步之后校验输入是否正确 | ||
this.setState({ value, flag: status == 'edit' }, () => { | ||
this.setState({ value, flag: status == 'edit'&&this.changeed }, () => { | ||
this.validate(); | ||
@@ -148,3 +157,2 @@ }); | ||
let { value, error, flag } = this.state; | ||
let { className, message, required,fieldProps } = this.props; | ||
@@ -151,0 +159,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29013
471