Options
All
  • Public
  • Public/Protected
  • All
Menu

utility class for optimized row context access

Hierarchy

  • KeyFinder

Index

Constructors

constructor

Properties

context

context to use

key

key: function

key function

Type declaration

    • (rowIndex: number): string
    • Parameters

      • rowIndex: number

      Returns string

Methods

exceptionHeightOf

  • exceptionHeightOf(index: number, returnDefault?: boolean): null | number
  • see heightOf but ignores padding and optional null in case of default height

    Parameters

    • index: number

      row index

    • Default value returnDefault: boolean = false

      return null if default height

    Returns null | number

heightOf

  • heightOf(index: number): number
  • returns the height of the row identified by index

    Parameters

    • index: number

    Returns number

padding

  • padding(index: number): number

pos

  • pos(index: number): number
  • returns the position of the tthe given index

    Parameters

    • index: number

      index to look for

    Returns number

posByKey

  • posByKey(key: string): object
  • returns the position of the given given or -1 if not found

    Parameters

    • key: string

    Returns object

    -1 if not found

positions

  • positions(first: number, last: number, offset: number, callback?: undefined | function): void
  • 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

    • Optional callback: undefined | function

      callack for each identified index

    Returns void