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

    Class UmbWorkspaceIsNewRedirectController

    Observe the workspace context to see if the entity is new or not. If that changes redirect to the edit url.

    This requires that the edit URL, is edit/:id

    Hierarchy (View Summary)

    Index
    timeout: any

    TODO: Figure out why we need this timeout. [NL] The problem this fixes it when save & publishing a document open in a modal, like from a collection. The redirect triggers something that ends up re-setting the path, making the modal path the one in the browser despite the modal is closed.

    • 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