@juantroconisf/lib 3.3.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -268,12 +268,12 @@ function useFormChange({
268
268
  setTouched(val);
269
269
  errors2.current = val;
270
270
  setState(
271
- preservedKeys === void 0 ? initialState : initialState.reduce(
271
+ preservedKeys === void 0 ? initialState : preservedKeys.reduce(
272
272
  (acc, key) => ({
273
273
  ...acc,
274
- [key]: preservedKeys.includes(key) ? state[key] : initialState[key]
274
+ [key]: state[key]
275
275
  }),
276
- {}
276
+ initialState
277
277
  )
278
278
  );
279
279
  },
package/dist/index.mjs CHANGED
@@ -249,12 +249,12 @@ function useFormChange({
249
249
  setTouched(val);
250
250
  errors2.current = val;
251
251
  setState(
252
- preservedKeys === void 0 ? initialState : initialState.reduce(
252
+ preservedKeys === void 0 ? initialState : preservedKeys.reduce(
253
253
  (acc, key) => ({
254
254
  ...acc,
255
- [key]: preservedKeys.includes(key) ? state[key] : initialState[key]
255
+ [key]: state[key]
256
256
  }),
257
- {}
257
+ initialState
258
258
  )
259
259
  );
260
260
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juantroconisf/lib",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "A state and validation library for HeroUI.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",