@umbraco-cms/backoffice
    Preparing search index...

    Class UmbWorkspaceActionBase<ArgsMetaType>Abstract

    Base class for an workspace action.

    UmbWorkspaceActionBase

    Type Parameters

    • ArgsMetaType = never

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    _isDisabled: UmbBooleanState<false> = ...
    _isExecuting?: UmbBooleanState<boolean>
    isDisabled: Observable<boolean> = ...
    isExecuting?: Observable<boolean>

    Emits true while execute() is performing real work (e.g. after a preceding modal/dialog has been confirmed) and false otherwise.

    Consumers (such as the workspace action element) use this to show in-flight UI - e.g. a button spinner - only while work is actually happening, not while a user is interacting with a modal.

    Optional; when not exposed, consumers fall back to assuming work begins immediately on execute().

    Accessors

    Methods

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

      MDN Reference

      Parameters

      • event: Event

      Returns boolean

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | EventListenerOptions

      Returns void

    • Signals whether execute() is currently performing real work. Subclasses that opt in to modal-aware execution feedback should:

      1. Call this.setExecuting(false) in their constructor so isExecuting is exposed before the workspace-action element observes it.
      2. Call this.setExecuting(true) once any preceding modal has been confirmed and real work is about to begin.
      3. Wrap the work in try/finally and call this.setExecuting(false) on completion so the observable honours its contract.

      Subclasses that never call this method keep isExecuting undefined, which signals consumers to fall back to legacy eager-feedback behaviour.

      Parameters

      • value: boolean

        true while real work is in flight; false otherwise.

      Returns void

      UmbWorkspaceActionBase