Class
FormResetEvent
@ng-forge/dynamic-forms
Event dispatched when the form should be reset to its default values.
This event instructs the dynamic form component to restore all field values to their initial default values as defined in the form configuration.
Signature
class FormResetEvent
implements FormEventProperties
| Name | Type | Description |
|---|---|---|
type | "form-reset" | - |
Examples
// Dispatch from a button component
eventBus.dispatch(FormResetEvent);// Listen for reset events
eventBus.on<FormResetEvent>('form-reset').subscribe(() => {
console.log('Form was reset to defaults');
});packages/dynamic-forms/src/lib/events/constants/form-reset.event.ts:23