Hosanna UI API v2.3.0-next
    Preparing search index...

    Class HsAction<T>

    The HsAction class represents an action in the system. It extends the HsObservable class and implements the IHsAction interface. The class provides a way to manage the state and type of actions within the application. It includes properties for the action type, payload, and current state.

    Type Parameters

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    __hs_isObservable: boolean = true
    _cacheKey: string = 'TODO'
    _hid?: string

    Identifies this object as an observer of other observables. Assigned on first use.

    actionType: T = ...
    finishState: ActionState = ActionState.Pending
    payload?: JsonData
    state: ActionState = ActionState.Pending
    version: number = 0

    Methods

    • Stops observing every object held in an @observable field. Call when this object is no longer needed.

      Returns void

    • Parameters

      • key: string

      Returns unknown


    • Observing other observables

      @observable(['fieldA', 'fieldB']) other!: OtherObservable on an HsObservable subclass observes those fields of other, the same way the decorator does on a view. Changes arrive in onObservableFieldUpdated.


      Parameters

      • field: string
      • OptionalfieldFilters: string[]

      Returns void

    • Parameters

      • key: string
      • owner: IIdentifiable

      Returns void

    • Observes again after dispose(), using the objects currently held in the @observable fields.

      Returns void

    • Parameters

      • key: string
      • value: unknown

      Returns void

    • Assignment to an @observable field: observe the new object and notify this object's own observers.

      Parameters

      • key: string
      • value: unknown

      Returns void