@nospamproxy/core
    Preparing search index...

    Control for displaying a generic list.

    Type Parameters

    • T = unknown

    Implements

    • ICustomElementViewModel
    Index

    Constructors

    Properties

    $controller: ICustomElementController<ListControl<T>>
    add?: () => void

    A callback to add an item.

    If specified, an "Add" button is shown automatically.

    contentAnchor: HTMLElement

    A bindable reference to the content element of this list.

    This can be used to detect if an event originated from the list content or somewhere else.

    defaultSorting?: ListSorting

    The default sorting to apply.

    This is applied initially if there isn't any state to import and when the list model is replaced for some reason.

    disablePagination: boolean = false

    Set this to true to disable the pagination controls.

    edit?: (item: T, indexInPage: number) => void

    A callback to edit an item.

    If specified, a "Modify" button is shown automatically.

    hasAddClaim: boolean = true
    hasEditClaim: boolean = true
    hasRemoveClaim: boolean = true
    hiddenColumns?: string[]

    An array of hidden column ids.

    items: ListModel<T> | null = null
    refresh?: false | (() => void)

    A callback to refresh the list.

    If specified, a "Refresh" button is shown automatically.

    remove?: true | ((item: T, indexInPage: number) => void)

    A callback to remove an item or a boolean indicating if items can be removed in memory.

    If specified, a "Remove" button is shown automatically.

    resetFiltersEventChannel: string = ...
    resource?: string

    If specified, the list checks, if the currernt user has a claim in the form "manage:" and hides all standard actions if not.

    selectionChangedByUser?: () => void

    A callback to be invoked when the selection is changed by the user. This is meant to cause side effects like navigating within a side overlay.

    If you need to react to any arbitrary selection change including programmatic changes, watch the respective properties of the list model instead.

    selectionMode: ListSelectionMode = 'single'

    The selection mode.

    Default is "single".

    size: ListSize = 'scrollable'
    sorting: ListSorting | null = null

    A two way bindable property that represents the visual state of the list.

    When the user changes the column order or width, this property is updated.

    Methods

    • Parameters

      • _initiator: IHydratedController

      Returns void | Promise<void>

    • Parameters

      • _initiator: IHydratedController
      • _parent: IHydratedController | null

      Returns void

    • Try editing a row by index.

      Parameters

      • Optionalindex: number

        The index to edit. Default is the currently selected index.

      Returns boolean

      True, if any action was invoked.

    • Try removing a row by index.

      Parameters

      • Optionalindex: number

        The index to remove. Default is the currently selected index.

      Returns boolean

      True, if any action was invoked.

    • Parameters

      • node: HTMLElement

      Returns void