Interface RowNumberOptionsIf

Options of the row number column (RowNumberColumnDef). Pass any subset – to new RowNumberColumnDef({ … }) or as rowNumbersVisible: { … } to TableFactory.createTableModel. Defaults: RowNumberOptions.

Example

const tableModel = TableFactory.createTableModel({
rows: orders,
rowNumbersVisible: { mode: "original", format: n => n.toLocaleString("en-US"), exported: true }
});

Since

1.1.93

Hierarchy

  • RowNumberOptionsIf

Implemented by

Properties

exported: boolean

true: TableApi.copyToClipboard and TableApi.downloadExcel contain the numbers. Default false.

format: ((rowNumber) => string)

Type declaration

    • (rowNumber): string
    • The text of a number. Default String(n) – no thousands separators ("2000000"). The column width is measured with the text of the largest number, so the text should not get shorter for larger numbers.

      Parameters

      • rowNumber: number

      Returns string

      Example

      const options: Partial<RowNumberOptionsIf> = { format: n => n.toLocaleString("de-DE") }; // "2.000.000"
      
headerLabel: string

Text of the header cell. Default "#" (an empty header cell has no accessible name).

minWidthInPx: number

The column is never narrower than this (px). Default 36.

"display" (default) or "original", see RowNumberMode.