use-redux-form
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -93,3 +93,3 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
var handleSubmit = function handleSubmit(fn) { | ||
var errors = validate(formState); | ||
var errors = validate(formState) || {}; | ||
var isInvalid = compose(isNotNil, find(identity), values, defaultTo({}))(errors); | ||
@@ -138,4 +138,4 @@ var args = { | ||
var isFalsy = isRequired && isNone(transformedValue); | ||
var errors = validate(formState); | ||
var isInvalid = isFalsy || errors || errors && !!errors[computedKey]; | ||
var errors = validate(formState) || {}; | ||
var isInvalid = isFalsy || !!errors[computedKey]; | ||
return excludeProps(exclude, { | ||
@@ -142,0 +142,0 @@ value: transformedValue, |
@@ -102,3 +102,3 @@ 'use strict'; | ||
var handleSubmit = function handleSubmit(fn) { | ||
var errors = validate(formState); | ||
var errors = validate(formState) || {}; | ||
var isInvalid = ramda.compose(isNotNil, ramda.find(ramda.identity), ramda.values, ramda.defaultTo({}))(errors); | ||
@@ -147,4 +147,4 @@ var args = { | ||
var isFalsy = isRequired && isNone(transformedValue); | ||
var errors = validate(formState); | ||
var isInvalid = isFalsy || errors || errors && !!errors[computedKey]; | ||
var errors = validate(formState) || {}; | ||
var isInvalid = isFalsy || !!errors[computedKey]; | ||
return excludeProps(exclude, { | ||
@@ -151,0 +151,0 @@ value: transformedValue, |
{ | ||
"name": "use-redux-form", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "React hook for using Redux store", | ||
@@ -5,0 +5,0 @@ "author": "Tony Jin <jsveron23@gmail.com>", |
@@ -44,3 +44,3 @@ # use-redux-form | ||
* @default () => ({}) | ||
* @param {Object} values [description] | ||
* @param {Object} values | ||
* @return {Object} empty object = valid | ||
@@ -61,4 +61,4 @@ */ | ||
* @default (args) => args.value | ||
* @param {String} name [description] | ||
* @param {*} value [description] | ||
* @param {String} name fieldPath | ||
* @param {*} value | ||
* @param {*?} evt if nil value, not from `onChange` | ||
@@ -238,6 +238,6 @@ * @return {*} a component asks specific data type | ||
* @default undefined | ||
* @param {*} childNode this case child node of `someParentState` | ||
* @param {*} childState this case child node of `someParentState` | ||
* @return {String} fieldPath | ||
*/ | ||
key: (childNode) => { | ||
key: (childState) => { | ||
const foundIndex = childState.findIndex(lookingForSpecificId) | ||
@@ -244,0 +244,0 @@ |
23172