react-cron-generator
Advanced tools
Comparing version 1.2.8 to 1.2.9
@@ -46,3 +46,9 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
value: function componentWillReceiveProps(nextProps) { | ||
if (this.props.value !== nextProps.value && this.state.value) { | ||
var nextVal = nextProps.value; | ||
if (nextVal && nextVal.split(' ').length === 6) { | ||
nextVal += ' *'; | ||
} | ||
if (this.props.value !== nextVal && this.state.value) { | ||
var newVal = ''; | ||
@@ -52,4 +58,4 @@ newVal = this.state.value.toString().replace(/,/g, ' '); | ||
if (nextProps.value !== newVal) { | ||
this.setValue(nextProps.value); | ||
if (nextVal !== newVal) { | ||
this.setValue(nextVal); | ||
} | ||
@@ -144,4 +150,10 @@ } | ||
value: function parentChange(val) { | ||
var value = val; | ||
var newVal = ''; | ||
newVal = val.toString().replace(/,/g, ' '); | ||
if (this.props.sixValueCron) { | ||
var yearVal = value.pop(); | ||
} | ||
newVal = value.toString().replace(/,/g, ' '); | ||
newVal = newVal.replace(/!/g, ','); | ||
@@ -148,0 +160,0 @@ this.props.onChange(newVal); |
{ | ||
"name": "react-cron-generator", | ||
"version": "1.2.8", | ||
"version": "1.2.9", | ||
"description": "Simple react component to generate cron expression", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -10,2 +10,4 @@ # react-cron-generator | ||
Support both 6 value and 7 value crons | ||
``` | ||
@@ -68,2 +70,3 @@ data = '* * * * * * *' | ||
| options | Options for Cron component, *Must pass a valid cron value for available headers | All available headers | No | ||
| sixValueCron | specify 6 or 7 value crons(true -> 6 value, false -> 7 value) | false | No | ||
@@ -70,0 +73,0 @@ **translateFn** |
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
42365
1012
114