Class ARowRendererAbstract

base class for creating a scalable table renderer based on rows

Hierarchy (view full)

Constructors

Properties

body: HTMLElement
lastScrollInfo: null | IScrollInfo = null
options: Readonly<IRowRendererOptions> = ...
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

Methods

  • register another mixin to this renderer

    Parameters

    • MixinClass: IMixinClass

      the mixin class to instantiate

    • Optional options: 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, 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

  • 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

  • removes all rows and recreates the table

    Parameters

    • Optional ctx: IAnimationContext

      optional animation context to create a transition between the previous and the current tables

    Returns void

    nothing

  • triggers a revalidation of the current scrolling offset

    Returns void