Interface ColumnAutoWidthOptionsIf

Fitting a column width to its content: a double click on the resize handle, TableApi.autoResizeColumn and TableApi.autoResizeColumns (tableOptions.columnAutoWidth).

Example

const tableOptions: TableOptionsIf = {
...new TableOptions(),
columnAutoWidth: {
maxRows: 50_000,
getWidth: ctx => ctx.property === "message" ? ctx.measureText("x".repeat(80)) : undefined,
},
};

Since

1.1.110

Hierarchy

  • ColumnAutoWidthOptionsIf

Implemented by

Properties

doubleClick: boolean

A double click on the resize handle fits the width of the column to its content. Only where a handle is (columnsResizable and the column is not resizable: false). Default true.

getWidth?: ((ctx) => undefined | number)

Type declaration

    • (ctx): undefined | number
    • Own measurement: return the width in px, or undefined for the default. The result is limited by minWidth / maxWidth of the column.

      Returns undefined | number

maxRows: number

Body rows that are measured: up to this number of rows all of them, above only the rows drawn now (the time stays the same with millions of rows). Header and footer are always measured. Default 10_000.