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

    Class UmbTreeItemPickerLocationManager

    Tracks where in a tree a picker is browsing: the trail to it, the node itself, and the memory of both.

    Hierarchy (View Summary)

    Index
    currentLocation: Observable<UmbTreeItemPickerLocation | null | undefined> = ...

    Where the picker is browsing, as a tri-state:

    • undefined — no location established yet.
    • null — the node last browsed to is not in the tree. A host should say so rather than show a level it cannot describe, and must not treat this as still loading.
    • a model — the node being browsed.
    • 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. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().

      MDN Reference

      Parameters

      • event: Event

      Returns boolean

    • Browses to a node, leaving the trail, the current location and the remembered location consistent with each other.

      A node already in the trail is browsed by shortening the trail to it, so stepping back up costs no request. A node the tree does not have leaves the current location null.

      Parameters

      • Optionalentity: UmbEntityModel

        The node to browse, or undefined for the start node when there is one and the tree root otherwise.

      Returns Promise<void>

      Resolves once the trail and the current location have been set.

      UmbTreeItemPickerLocationManager

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.

      MDN Reference

      Parameters

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

      Returns void