Pilates
    Preparing search index...

    Interface TableColumn<Row>

    interface TableColumn<Row> {
        align?: TableAlign;
        header: string;
        key: keyof Row & string;
        render?: (value: Row[keyof Row & string], row: Row) => string;
        width?: number;
    }

    Type Parameters

    • Row
    Index

    Properties

    align?: TableAlign

    Default 'left'.

    header: string

    Header text rendered in the top row.

    key: keyof Row & string

    Property of the row used to look up this column's raw value.

    render?: (value: Row[keyof Row & string], row: Row) => string

    Custom cell renderer. Receives the looked-up value and the full row. Return a plain string — Table will pad / truncate it to width. Returning markup is out of scope for v1; pad-then-truncate semantics only work on plain strings.

    width?: number

    Column width in cells. When omitted, the column flexes to fill remaining space (multiple flex columns split it equally).