Wagtail client-side components
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    chooserElement: HTMLElement | null | undefined
    chooserModalClass: any = DocumentChooserModal
    editLink: Element | null | undefined
    editUrlStateKey: string = 'edit_url'

    Key used in the 'state' dictionary to hold the URL of the edit page.

    input: HTMLElement | null | undefined
    modal: ChooserModal | undefined
    opts: {}
    state: { id: any } | null
    titleElement: Element | null | undefined
    titleStateKey: string = 'title'

    Key used in the 'state' dictionary to hold the human-readable title.

    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

      Returns boolean

    • Construct initial state of the chooser from the rendered (static) HTML. State is either null (= no item chosen) or a dict of id, title and edit_url.

      The result returned from the chooser modal (see get_chosen_response_data in wagtail.admin.views.generic.chooser.ChosenView) is a superset of this, and can therefore be passed directly to chooser.setState.

      Returns { id: any } | null

    • 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