Class ACellTableSection<T>Abstract

base class for a cell renderer as table section

Type Parameters

Hierarchy (view full)

Implements

Constructors

Properties

body: HTMLElement
header: HTMLElement
lastScrollInfo: null | IScrollInfo = null
options: Readonly<IRowRendererOptions> = ...
tableId: string
visible: {
    first: number;
    forcedFirst: number;
    forcedLast: number;
    last: number;
} = ...

currently visible slice

Type declaration

  • first: number
  • forcedFirst: number
  • forcedLast: number
  • last: number
visibleFirstRowPos: number = 0

position of the first visible row in pixel

Accessors

  • get bodyScroller(): HTMLElement
  • get the scrolling container i.e. parent of the body element

    Returns HTMLElement

  • get bodySizer(): HTMLElement
  • Returns HTMLElement

Methods

  • register another mixin to this renderer

    Parameters

    • MixinClass: IMixinClass

      the mixin class to instantiate

    • Optional options: unknown

      optional constructor options

    Returns void

  • create a new cell node fo the given row index and column

    Parameters

    • document: Document

      document the create nodes of

    • index: number

      the current row index

    • column: T

      the current column

    Returns HTMLElement | IAsyncUpdate<HTMLElement>

    the node representing the cell

  • create a new header node for the given column

    Parameters

    • document: Document

      document to create nodes of

    • column: T

      the column to create the header for

    Returns HTMLElement | IAsyncUpdate<HTMLElement>

    the node representing the header

  • utility to execute a function for each visible row

    Parameters

    • callback: ((row, rowIndex) => void)

      callback to execute

        • (row, rowIndex): void
        • Parameters

          • row: HTMLElement
          • rowIndex: number

          Returns void

    • inPlace: boolean = false

      whether the DOM changes should be performed in place instead of in a fragment

    Returns void

  • hook when the visibility changes

    Parameters

    • _visible: boolean

      current visibility

    Returns void

  • show the section

    Parameters

    • scrollLeft: number

      visible left margin

    • clientWidth: number

      visible width

    • isGoingRight: boolean

      whether it was a shift to the right

    Returns void

  • updates the given cell node with the given row index and column

    Parameters

    • node: HTMLElement

      node to update

    • index: number

      row index to use

    • column: T

      column to use

    Returns void | HTMLElement | IAsyncUpdate<HTMLElement>

    an optional new replacement node for the header

  • updates the given header node with the given column

    Parameters

    • node: HTMLElement

      node to update

    • column: T

      the column to represents

    Returns void | HTMLElement | IAsyncUpdate<HTMLElement>

    an optional new replacement node for the header