@timlassiter11/yatl
    Preparing search index...

    Interface ColumnOptions<T>

    Column options for the table.

    interface ColumnOptions<T> {
        elementFormatter?: null | CellFormatterCallback<T>;
        field: NestedKeyOf<T>;
        filter?: null | ColumnFilterCallback;
        resizable?: boolean;
        searchable?: boolean;
        sortable?: boolean;
        sorter?: null | ComparatorCallback;
        sortValue?: null | SortValueCallback;
        title?: string;
        tokenize?: boolean;
        valueFormatter?: null | ValueFormatterCallback<T>;
    }

    Type Parameters

    • T
    Index

    Properties

    elementFormatter?: null | CellFormatterCallback<T>

    A function to format the element for display.

    field: NestedKeyOf<T>

    The field name in the data object.

    filter?: null | ColumnFilterCallback

    A custom function to determine if a cell's value in this column matches a given filter criterion. This is used when DataTable.filter() is called with an object-based filter that targets this column's field.

    resizable?: boolean

    Whether the column should be resizable.

    searchable?: boolean

    Whether the column is searchable.

    sortable?: boolean

    Whether the column is sortable.

    sorter?: null | ComparatorCallback

    A function to use for sorting the column. This overrides the default sorting behavior.

    sortValue?: null | SortValueCallback

    A function to derive a comparable value from the cell's original value, specifically for sorting this column. This can be used to preprocess and cache values (e.g., convert to lowercase, extract numbers) before comparison.

    title?: string

    The title to display in the header.

    tokenize?: boolean

    Whether the column's data should be tokenized for searching.

    valueFormatter?: null | ValueFormatterCallback<T>

    A function to format the value for display.