File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -340,13 +340,14 @@ export default function useFormState<T>(
340340 h : Customizing < T , K > | CustomizingRaw < T , K > | undefined
341341 ) => {
342342 let enhancedV = h ?. enhance ? h ?. enhance ( v , valuesRef . current ) : v ;
343-
344343 const newValues = deepSet ( valuesRef . current , k , enhancedV ) as T ;
345- setValues ( newValues ) ;
346- checkError ( k , h , enhancedV , valuesRef . current ) ;
347344
348345 ( h as Customizing < T , K > ) ?. onChangeText ?.( enhancedV as any ) ;
349346 ( h as CustomizingRaw < T , K > ) ?. onChange ?.( enhancedV as any ) ;
347+
348+ setValues ( newValues ) ;
349+ checkError ( k , h , enhancedV , valuesRef . current ) ;
350+
350351 // prevent endless re-render if called on nested form
351352 // TODO: not needed anymore probably test it out
352353 setTimeout ( ( ) => {
You can’t perform that action at this time.
0 commit comments