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 FormEvent

Properties

NameTypeDescription
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');
});