Interface DataTableStateColumnFilterOptions<T>

interface DataTableStateColumnFilterOptions<T> {
    display?: (
        filterList: FilterList,
        onChange: (
            value: string | string[],
            index: number,
            column: ColumnState<T>,
        ) => void,
        index: number,
        column: ColumnState<T>,
        filterData: Primitive[][],
    ) => ReactNode;
    fullWidth?: boolean;
    logic?: (prop: string, filterValue: string[], row: T) => boolean;
    names?: string[];
    renderValue?: (value: Primitive) => ReactNode;
}

Type Parameters

  • T

Properties

display?: (
    filterList: FilterList,
    onChange: (
        value: string | string[],
        index: number,
        column: ColumnState<T>,
    ) => void,
    index: number,
    column: ColumnState<T>,
    filterData: Primitive[][],
) => ReactNode

Custom rendering inside the filter dialog.

filterList must be of the same type in the main column options, that is an array of arrays, where each array corresponds to the filter list for a given column.

fullWidth?: boolean

Will force a filter option to take up the grid's full width.

logic?: (prop: string, filterValue: string[], row: T) => boolean

custom filter logic.

names?: string[]

Custom names for the filter fields.

renderValue?: (value: Primitive) => ReactNode

A function to customize filter choices.

Use case: changing empty strings to "(empty)" in a dropdown.