The plugin added to fields by the resetPlugin.

interface ResetPlugin {
    isDirty: boolean;
    getDirtyFields(): BareField<any, any>[];
    on(eventType: "change:initialValue", subscriber: Subscriber<any, any>): Unsubscribe;
    reset(): void;
    setInitialValue(value: any): void;
}

Properties

isDirty: boolean

true if the field value is different from its initial value.

Methods

  • Subscribes to changes of the initial value.

    Parameters

    • eventType: "change:initialValue"

      The type of the event.

    • subscriber: Subscriber<any, any>

      The subscriber that would be triggered.

    Returns Unsubscribe

    The callback to unsubscribe the subscriber.

  • Reverts the field to its initial value.

    Returns void

  • Sets the initial value of the field and notifies ancestors and descendants.

    Parameters

    • value: any

      The initial value to set.

    Returns void