react-form
Advanced tools
Comparing version 4.0.0-alpha.12 to 4.0.0-alpha.13
@@ -501,5 +501,2 @@ import React from 'react'; | ||
meta = _React$useState2$.meta, | ||
_React$useState2$$met = _React$useState2$.meta, | ||
isSubmitting = _React$useState2$$met.isSubmitting, | ||
isTouched = _React$useState2$$met.isTouched, | ||
__fieldMeta = _React$useState2$.__fieldMeta, | ||
@@ -528,3 +525,3 @@ setState = _React$useState2[1]; | ||
var isValid = !fieldsAreValidating && fieldsAreValid && !meta.error; | ||
var canSubmit = isValid && !isSubmitting; // Decorate form meta | ||
var canSubmit = isValid && !meta.isValidating && !meta.isSubmitting; // Decorate form meta | ||
@@ -955,3 +952,3 @@ meta = React.useMemo(function () { | ||
React.useEffect(function () { | ||
if (!validatePristine && !isTouched) { | ||
if (!validatePristine && !meta.isTouched) { | ||
return; | ||
@@ -961,3 +958,3 @@ } | ||
apiRef.current.runValidation(values); | ||
}, [isTouched, validatePristine, values]); // When defaultValues update, set them | ||
}, [meta.isTouched, validatePristine, values]); // When defaultValues update, set them | ||
@@ -964,0 +961,0 @@ React.useEffect(function () { |
@@ -507,5 +507,2 @@ 'use strict'; | ||
meta = _React$useState2$.meta, | ||
_React$useState2$$met = _React$useState2$.meta, | ||
isSubmitting = _React$useState2$$met.isSubmitting, | ||
isTouched = _React$useState2$$met.isTouched, | ||
__fieldMeta = _React$useState2$.__fieldMeta, | ||
@@ -534,3 +531,3 @@ setState = _React$useState2[1]; | ||
var isValid = !fieldsAreValidating && fieldsAreValid && !meta.error; | ||
var canSubmit = isValid && !isSubmitting; // Decorate form meta | ||
var canSubmit = isValid && !meta.isValidating && !meta.isSubmitting; // Decorate form meta | ||
@@ -961,3 +958,3 @@ meta = React.useMemo(function () { | ||
React.useEffect(function () { | ||
if (!validatePristine && !isTouched) { | ||
if (!validatePristine && !meta.isTouched) { | ||
return; | ||
@@ -967,3 +964,3 @@ } | ||
apiRef.current.runValidation(values); | ||
}, [isTouched, validatePristine, values]); // When defaultValues update, set them | ||
}, [meta.isTouched, validatePristine, values]); // When defaultValues update, set them | ||
@@ -970,0 +967,0 @@ React.useEffect(function () { |
{ | ||
"name": "react-form", | ||
"version": "4.0.0-alpha.12", | ||
"version": "4.0.0-alpha.13", | ||
"description": "⚛️ 💼 React hooks for managing form state and lifecycle", | ||
@@ -5,0 +5,0 @@ "author": "tannerlinsley", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
230429
2252