Class ARowRendererAbstract

base class for creating a scalable table renderer based on rows

Hierarchy (View Summary)

Constructors

Properties

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

currently visible slice

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

Methods

  • register another mixin to this renderer

    Parameters

    • MixinClass: IMixinClass

      the mixin class to instantiate

    • Optionaloptions: unknown

      optional constructor options

    Returns void

  • destroys this renderer and unregisters all event listeners

    Returns void

  • utility to execute a function for each visible row

    Parameters

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

      callback to execute

    • inPlace: boolean = false

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

    Returns void

  • initializes the table and register the onscroll listener

    Returns void

    nothing

  • scrolling vertically

    Parameters

    • scrollTop: number

      top scrolling

    • clientHeight: number

      visible height

    • isGoingDown: boolean

      hint whether the scrollTop increases

    Returns EScrollResult

    full in case of a full rebuild or partial update

  • triggers a revalidation of the current scrolling offset

    Returns void