@joinbox/formsync
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -6,2 +6,13 @@ # Change Log | ||
## 2.0.1 (2021-06-01) | ||
### Bug Fixes | ||
* **formsync:** only autosubmit form if input is valid ([b1753a0](https://github.com/joinbox/ui-components/commit/b1753a0c53ca06df0071d8fb033f84585ac691af)) | ||
# 2.0.0 (2021-05-28) | ||
@@ -8,0 +19,0 @@ |
@@ -132,2 +132,7 @@ (function () { | ||
submitOriginalForm() { | ||
// Only submit form if input is valid; is needed to e.g. not submit a form on a date | ||
// input that reads 0002-01-01 (which is what happens when user enters 01012); to prevent | ||
// it, use e.g. min="2021-05-31"; the form will only be submitted if the value entered | ||
// is in the future. | ||
if (!this.clonedElement.checkValidity()) return; | ||
submitForm(this.getOriginalForm()); | ||
@@ -134,0 +139,0 @@ } |
{ | ||
"name": "@joinbox/formsync", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Synchronizes forms and elements between an original form (e.g. one created by Drupal) and another form (e.g. freely created as a template based on mockups).", | ||
@@ -32,3 +32,3 @@ "main": "FormSync.js", | ||
}, | ||
"gitHead": "a91f39937e92e529ca13ed7e7198d1aa5063d20f" | ||
"gitHead": "77ccc8ebbb0505bf30c80564d1e51f7d3985964b" | ||
} |
@@ -54,2 +54,7 @@ import submitForm from './submitForm.js'; | ||
submitOriginalForm() { | ||
// Only submit form if input is valid; is needed to e.g. not submit a form on a date | ||
// input that reads 0002-01-01 (which is what happens when user enters 01012); to prevent | ||
// it, use e.g. min="2021-05-31"; the form will only be submitted if the value entered | ||
// is in the future. | ||
if (!this.clonedElement.checkValidity()) return; | ||
submitForm(this.getOriginalForm()); | ||
@@ -56,0 +61,0 @@ } |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
74974
1458
0