Skip to content

Commit ecf5bda

Browse files
committed
Fixed setState causes a double setState
1 parent c7018ea commit ecf5bda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/form.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ export class FormState<T, State = DefaultState, Error extends string = DefaultEr
404404
this._state = newState;
405405

406406
let c = Object.keys(this.values);
407-
if (notifyChild) c.forEach((e) => this.childMap[e]?.setState(newState, notifyChild, notifyParent));
407+
if (notifyChild) c.forEach((e) => this.childMap[e]?.setState(newState, true, false));
408408

409409
c.forEach((e) => this.fireListeners(e as keyof T));
410410
this.fireAnyListeners();

0 commit comments

Comments
 (0)