use-redux-form
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -127,4 +127,11 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty'; | ||
if (typeof key === 'function') { | ||
computedKey = "".concat(fieldPath).concat(key(computedValue, formState)); | ||
computedValue = extractByPath(parsePath(computedKey), formState); | ||
var computedPath = key(computedValue, formState); | ||
var hasNagativeIndex = /\[(-\d+?)\]/.test(computedPath); // to get rid of negitive array index | ||
if (hasNagativeIndex) { | ||
computedValue = ''; | ||
} else { | ||
computedKey = "".concat(fieldPath).concat(computedPath); | ||
computedValue = extractByPath(parsePath(computedKey), formState); | ||
} | ||
} | ||
@@ -131,0 +138,0 @@ |
@@ -136,4 +136,11 @@ 'use strict'; | ||
if (typeof key === 'function') { | ||
computedKey = "".concat(fieldPath).concat(key(computedValue, formState)); | ||
computedValue = extractByPath(parsePath(computedKey), formState); | ||
var computedPath = key(computedValue, formState); | ||
var hasNagativeIndex = /\[(-\d+?)\]/.test(computedPath); // to get rid of negitive array index | ||
if (hasNagativeIndex) { | ||
computedValue = ''; | ||
} else { | ||
computedKey = "".concat(fieldPath).concat(computedPath); | ||
computedValue = extractByPath(parsePath(computedKey), formState); | ||
} | ||
} | ||
@@ -140,0 +147,0 @@ |
{ | ||
"name": "use-redux-form", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "React hook for using Redux store", | ||
@@ -5,0 +5,0 @@ "author": "Tony Jin <jsveron23@gmail.com>", |
23624
323