You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/form.ts
+5-16Lines changed: 5 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -213,7 +213,7 @@ export class FormState<T extends object, State = DefaultState, Error extends str
213
213
* @param isDefault Is this the default value?
214
214
* @param notifyChild Should this form notify the child form about this change?
215
215
* @param notifyParent Should this form notify the parent form about this change?
216
-
* @paramsetValuesWasUsed Fire all `anyListeners` after field is set? You should not touch this. (will be false for bulk sets, they will call fireAnyListeners() after every field is set)
216
+
* @paramfireAny Fire all `anyListeners` after field is set?
217
217
*/
218
218
publicsetValue<KeyextendskeyofT>(
219
219
key: Key,
@@ -291,6 +291,7 @@ export class FormState<T extends object, State = DefaultState, Error extends str
291
291
}
292
292
293
293
this.fireAnyListeners();
294
+
294
295
if(notifyParent&&thisinstanceofChildFormState){
295
296
if(typeofvalues==="object"&&values!==null){
296
297
this.parent.setValueInternal(
@@ -354,6 +355,7 @@ export class FormState<T extends object, State = DefaultState, Error extends str
354
355
* @param error The error.
355
356
* @param notifyChild Should this form notify the child form about this change?
356
357
* @param notifyParent Should this form notify the parent form about this change?
358
+
* @param fireAny Fire all `anyListeners` after field is set?
357
359
*/
358
360
publicsetError<KeyextendskeyofT>(
359
361
key: Key,
@@ -465,7 +467,7 @@ export class FormState<T extends object, State = DefaultState, Error extends str
465
467
* Creates a submit handler to pass to your `<form onSubmit={...}>`. The function executes the passed handler only if the form validates correctly.
466
468
* @param handler The handler to execute when this form contains no errors.
0 commit comments