@mantine/form
Advanced tools
Comparing version 5.4.2 to 5.5.0
@@ -100,3 +100,6 @@ 'use strict'; | ||
const setValues = React.useCallback((payload) => { | ||
_setValues(payload); | ||
_setValues((currentValues) => { | ||
const valuesPartial = typeof payload === "function" ? payload(currentValues) : payload; | ||
return __spreadValues(__spreadValues({}, currentValues), valuesPartial); | ||
}); | ||
clearInputErrorOnChange && clearErrors(); | ||
@@ -103,0 +106,0 @@ }, []); |
@@ -92,3 +92,6 @@ import { useState, useRef, useCallback } from 'react'; | ||
const setValues = useCallback((payload) => { | ||
_setValues(payload); | ||
_setValues((currentValues) => { | ||
const valuesPartial = typeof payload === "function" ? payload(currentValues) : payload; | ||
return __spreadValues(__spreadValues({}, currentValues), valuesPartial); | ||
}); | ||
clearInputErrorOnChange && clearErrors(); | ||
@@ -95,0 +98,0 @@ }, []); |
@@ -26,3 +26,3 @@ /// <reference types="react" /> | ||
export declare type LooseKeys<Values> = keyof Values | (string & {}); | ||
export declare type SetValues<Values> = React.Dispatch<React.SetStateAction<Values>>; | ||
export declare type SetValues<Values> = React.Dispatch<React.SetStateAction<Partial<Values>>>; | ||
export declare type SetErrors = React.Dispatch<React.SetStateAction<FormErrors>>; | ||
@@ -29,0 +29,0 @@ export declare type SetFormStatus = React.Dispatch<React.SetStateAction<FormStatus>>; |
{ | ||
"name": "@mantine/form", | ||
"description": "Mantine form management library", | ||
"version": "5.4.2", | ||
"version": "5.5.0", | ||
"main": "cjs/index.js", | ||
@@ -6,0 +6,0 @@ "module": "esm/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
140951
1191