Type alias EntityEditConfiguration<Entity>

EntityEditConfiguration<Entity>: {
    defaultEntity: Entity;
    eagerLoadSubscription?: boolean;
    entityEquals?: ((a: Entity, b: Entity) => boolean);
    onSaveCompletedEvent?: EventId<undefined>;
    validationEffectDebounceTime?: number;
}

Type specifying the configuration for EntityEditFactory,

Type Parameters

  • Entity

Type declaration

  • defaultEntity: Entity

    the initial default entity, hence the initial entity state before the load effect.

  • Optional eagerLoadSubscription?: boolean

    specifies whether the load behavior should be subscribed eagerly (defaults to false)

  • Optional entityEquals?: ((a: Entity, b: Entity) => boolean)
      • (a: Entity, b: Entity): boolean
      • Used to determine if the current entity state differs from default. Note that the default might differ from configured defaultEntity! A successful load effect will set a new default, as well as dispatching a setAsDefault event. This funtion defaults to shallowEquals, if not specified.

        Parameters

        • a: Entity
        • b: Entity

        Returns boolean

  • Optional onSaveCompletedEvent?: EventId<undefined>

    optional event id for an event that should be dispatched on all save completed events

  • Optional validationEffectDebounceTime?: number

    if specified with a value >0, this will be used as debounce-time for the validation-effect

Generated using TypeDoc