rc-cascader
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -5,2 +5,7 @@ # History | ||
## 0.3.0 / 2015-12-28 | ||
- Fix value and defaultValue | ||
- Add Test Case | ||
## 0.2.0 / 2015-12-25 | ||
@@ -7,0 +12,0 @@ |
@@ -62,3 +62,3 @@ 'use strict'; | ||
}; | ||
['handleChange', 'handlePopupVisibleChange'].forEach(function (method) { | ||
['handleChange', 'handlePopupVisibleChange', 'getPopupDOMNode'].forEach(function (method) { | ||
return _this[method] = _this[method].bind(_this); | ||
@@ -69,2 +69,7 @@ }); | ||
_createClass(Cascader, [{ | ||
key: 'getPopupDOMNode', | ||
value: function getPopupDOMNode() { | ||
return this.refs.trigger.getPopupDomNode(); | ||
} | ||
}, { | ||
key: 'handleChange', | ||
@@ -71,0 +76,0 @@ value: function handleChange(options) { |
@@ -48,5 +48,6 @@ 'use strict'; | ||
if ('value' in nextProps) { | ||
var value = nextProps.value || []; | ||
this.setState({ | ||
activeValue: nextProps.value || [], | ||
value: nextProps.value || [] | ||
activeValue: value, | ||
value: value | ||
}); | ||
@@ -97,7 +98,7 @@ } | ||
_this.props.onChange(activeOptions); | ||
// finish select | ||
// should set value to activeValue | ||
_this.setState({ value: activeValue }); | ||
} | ||
_this.setState({ | ||
activeValue: activeValue, | ||
value: activeValue | ||
}); | ||
_this.forceUpdate(); | ||
}; | ||
@@ -109,3 +110,2 @@ // specify the last argument `done`: | ||
this.props.onSelect(activeOptions, selectCallback); | ||
this.setState({ activeValue: activeValue }); | ||
} else { | ||
@@ -115,2 +115,4 @@ this.props.onSelect(activeOptions); | ||
} | ||
// set activeValue, waiting for async callback | ||
this.setState({ activeValue: activeValue }); | ||
} | ||
@@ -117,0 +119,0 @@ }, { |
{ | ||
"name": "rc-cascader", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "cascade select ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
26729
537