react-cron-generator
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -44,2 +44,9 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
}, { | ||
key: "componentWillReceiveProps", | ||
value: function componentWillReceiveProps(nextProps) { | ||
if (this.props.value !== nextProps.value) { | ||
this.setValue(nextProps.value); | ||
} | ||
} | ||
}, { | ||
key: "setValue", | ||
@@ -71,5 +78,5 @@ value: function setValue(value) { | ||
prevState.selectedTab = prevState.headers[0]; | ||
} | ||
} // this.parentChange(prevState.value) | ||
this.parentChange(prevState.value); | ||
this.setState(prevState); | ||
@@ -76,0 +83,0 @@ } |
{ | ||
"name": "react-cron-generator", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "Simple react component to generate cron expression", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -87,4 +87,6 @@ # react-cron-generator | ||
Added `ref` to the component now you can access state and functions using ref. You can change cron value from outside the component even after cron generator loaded, | ||
## Ref | ||
Added `ref` to the component now you can access state and functions using ref. | ||
add the new prop ` onRef={ref => (this.cronGen = ref)} ` | ||
@@ -101,4 +103,4 @@ | ||
``` | ||
Just call this.cronGen.setValue(/* Your new value */) to change the value when you need | ||
[Sojin Antony](https://github.com/sojinantony01) | ||
@@ -105,0 +107,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
41421
986
111