utility class for optimized row context access

Constructors

Properties

context to use

key: (rowIndex: number) => string

key function

Methods

  • see heightOf but ignores padding and optional null in case of default height

    Parameters

    • index: number

      row index

    • OptionalreturnDefault: boolean

      return null if default height

    Returns null | number

  • see heightOf but ignores padding and optional null in case of default height

    Parameters

    • index: number

      row index

    • returnDefault: true

      return null if default height

    Returns number

  • returns the height of the row identified by index

    Parameters

    • index: number

    Returns number

  • returns the position of the given index

    Parameters

    • index: number

      index to look for

    Returns number

  • returns the position of the given given or -1 if not found

    Parameters

    • key: string

    Returns { index: number; pos: number }

  • computes the positions and keys for a range of given indices

    Parameters

    • first: number

      first row index

    • last: number

      last row index

    • offset: number

      pos offset for the first row index

    • Optionalcallback: (index: number, key: string, pos: number) => void

      callback for each identified index

    Returns void