Class MasterDetailOptions<T>

The defaults of MasterDetailOptionsIf.

Example

const options = MasterDetailOptions.create({ detailRenderer: (el, row) => { el.textContent = String(row.id); } });
options.detailHeight; // "auto"
options.maxRenderedDetails; // 50

Since

1.1.97

Type Parameters

  • T = any

Hierarchy

  • MasterDetailOptions

Implements

Constructors

Properties

detailHeight: DetailHeightType | ((row, rowIndex) => DetailHeightType) = "auto"

Height of the detail rows: px, "auto" (measured) or a function per row. Default "auto".

Type declaration

detailRenderer: DetailRendererIf<T> | DetailRenderFnType<T> = ...

Renders the content of a detail row (function or object with render()).

estimatedDetailHeight: number = 200

Height of an "auto" detail row before its content was measured (px). Default 200.

getRowId?: ((row) => string | number) = undefined

Type declaration

    • (row): string | number
    • Parameters

      • row: T

      Returns string | number

isMaster?: ((row, rowIndex) => boolean) = undefined

Type declaration

    • (row, rowIndex): boolean
    • Parameters

      • row: T
      • rowIndex: number

      Returns boolean

maxRenderedDetails: number = 50

At most this many detail contents exist at the same time. Beyond it the detail row that was out of view the longest is destroyed and created again when it scrolls back into view (context.recreated). Default 50.

toggleColumn?: string | number = undefined

The column with the expand/collapse icon: column index or property. Default: the first data column (behind a row number and a row checkbox column – where a tree has its arrow).

Methods