formact
Advanced tools
Comparing version 4.0.1-alpha to 4.0.2-alpha
@@ -27,3 +27,3 @@ "use strict"; | ||
const { lastUpdate } = form; | ||
const lastDependantUpdated = (0, react_1.useMemo)(() => { | ||
const lastDependencieUpdated = (0, react_1.useMemo)(() => { | ||
if ((dependsOn === null || dependsOn === void 0 ? void 0 : dependsOn.indexOf((lastUpdate === null || lastUpdate === void 0 ? void 0 : lastUpdate.fieldName) || '')) || -1 > -1) { | ||
@@ -42,3 +42,3 @@ return Date.now(); | ||
return values; | ||
}, [lastDependantUpdated]); | ||
}, [lastDependencieUpdated]); | ||
const errors = (0, react_1.useMemo)(() => { | ||
@@ -69,3 +69,3 @@ let error = ''; | ||
clear: () => { | ||
setValue(undefined); | ||
setValue(form.initialValues[props.name]); | ||
setShowError(false); | ||
@@ -72,0 +72,0 @@ }, |
{ | ||
"name": "formact", | ||
"version": "4.0.1-alpha", | ||
"version": "4.0.2-alpha", | ||
"description": "Context for React form components with validation", | ||
@@ -5,0 +5,0 @@ "scripts": { |
28307