Skip to main content
Version: Next

FilterSelectTableOptions<D>

The empty definitions of below provides a base definition for the parts used by useTable, that can then be extended in the users code.

Example

export interface TableOptions<D extends object = {}}>
extends
UseExpandedOptions<D>,
UseFiltersOptions<D> {}
see https://gist.github.com/ggascoigne/646e14c9d54258e40588a13aabf0102d for more details

Extends

Type Parameters

Type ParameterDefault type
D extends objectobject

Properties

autoResetExpanded?

optional autoResetExpanded: boolean;

Inherited from

TableOptions.autoResetExpanded


autoResetGlobalFilter?

optional autoResetGlobalFilter: boolean;

Inherited from

TableOptions.autoResetGlobalFilter


autoResetHiddenColumns?

optional autoResetHiddenColumns: boolean;

Inherited from

TableOptions.autoResetHiddenColumns


autoResetPage?

optional autoResetPage: boolean;

Inherited from

TableOptions.autoResetPage


autoResetSortBy?

optional autoResetSortBy: boolean;

Inherited from

TableOptions.autoResetSortBy


cellProps()?

optional cellProps: (cell) => TableCommonProps;

Function called for each table cell allowing style/className/role props to be overridden

Parameters

ParameterType
cellCell<D, any>

Returns

TableCommonProps

Inherited from

TableOptions.cellProps


className?

optional className: string;

Optional method to pass style. Added to table element

Inherited from

TableOptions.className


columnProps()?

optional columnProps: (column) => TableCommonProps;

Function called for each table column allowing style/className/role props to be overridden

Parameters

ParameterType
columnColumn<D>

Returns

TableCommonProps

Inherited from

TableOptions.columnProps


columns

columns: readonly Column<D>[];

Inherited from

TableOptions.columns


data

data: D[];

Inherited from

TableOptions.data


defaultCanSort?

optional defaultCanSort: boolean;

Inherited from

TableOptions.defaultCanSort


defaultColumn?

optional defaultColumn: Partial<Column<D>>;

Inherited from

TableOptions.defaultColumn


disabledMultiRemove?

optional disabledMultiRemove: boolean;

Inherited from

TableOptions.disabledMultiRemove


disableGlobalFilter?

optional disableGlobalFilter: boolean;

Inherited from

TableOptions.disableGlobalFilter


disableMultiSort?

optional disableMultiSort: boolean;

Inherited from

TableOptions.disableMultiSort


disableSortBy?

optional disableSortBy: boolean;

Inherited from

TableOptions.disableSortBy


disableSortRemove?

optional disableSortRemove: boolean;

Inherited from

TableOptions.disableSortRemove


downloadEnabled?

optional downloadEnabled: boolean;

Enable toolbar with download option

Inherited from

TableOptions.downloadEnabled


downloadFilename?

optional downloadFilename: string;

Inherited from

TableOptions.downloadFilename


downloadFormats?

optional downloadFormats: ("json" | "csv")[];

Inherited from

TableOptions.downloadFormats


expandSubRows?

optional expandSubRows: boolean;

Inherited from

TableOptions.expandSubRows


filterSelect

filterSelect: FilterSelect<D>;

filterTypes?

optional filterTypes: FilterTypes<D>;

Inherited from

TableOptions.filterTypes


getRowId()?

optional getRowId: (originalRow, relativeIndex, parent?) => string;

Parameters

ParameterType
originalRowD
relativeIndexnumber
parent?Row<D>

Returns

string

Inherited from

TableOptions.getRowId


getSubRows()?

optional getSubRows: (originalRow, relativeIndex) => D[];

Parameters

ParameterType
originalRowD
relativeIndexnumber

Returns

D[]

Inherited from

TableOptions.getSubRows


globalFilter?

optional globalFilter: string | (rows, columnIds, filterValue) => Row<D>[];

Inherited from

TableOptions.globalFilter


headerProps()?

optional headerProps: (header) => TableCommonProps;

Function called for each table header allowing style/className/role props to be overridden

Parameters

ParameterType
headerHeaderGroup<D>

Returns

TableCommonProps

Inherited from

TableOptions.headerProps


initialState?

optional initialState: Partial<TableState<D>>;

Inherited from

TableOptions.initialState


isMultiSortEvent()?

optional isMultiSortEvent: (e) => boolean;

Parameters

ParameterType
eMouseEvent<Element, MouseEvent>

Returns

boolean

Inherited from

TableOptions.isMultiSortEvent


manualExpandedKey?

optional manualExpandedKey: IdType<D>;

Inherited from

TableOptions.manualExpandedKey


manualGlobalFilter?

optional manualGlobalFilter: boolean;

Inherited from

TableOptions.manualGlobalFilter


manualPagination?

optional manualPagination: boolean;

Inherited from

TableOptions.manualPagination


manualSortBy?

optional manualSortBy: boolean;

Inherited from

TableOptions.manualSortBy


maxMultiSortColCount?

optional maxMultiSortColCount: number;

Inherited from

TableOptions.maxMultiSortColCount


orderByFn()?

optional orderByFn: (rows, sortFns, directions) => Row<D>[];

Parameters

ParameterType
rowsRow<D>[]
sortFnsOrderByFn<D>[]
directionsboolean[]

Returns

Row<D>[]

Inherited from

TableOptions.orderByFn


pageCount?

optional pageCount: number;

Inherited from

TableOptions.pageCount


paginateExpandedRows?

optional paginateExpandedRows: boolean;

Inherited from

TableOptions.paginateExpandedRows


rowProps()?

optional rowProps: (row) => TableCommonProps;

Function called for each table row allowing style/className/role props to be overridden

Parameters

ParameterType
rowRow<D>

Returns

TableCommonProps

Inherited from

TableOptions.rowProps


sortTypes?

optional sortTypes: Record<string, SortByFn<D>>;

Inherited from

TableOptions.sortTypes


stateReducer()?

optional stateReducer: (newState, action, previousState, instance?) => TableState<D>;

Parameters

ParameterType
newStateTableState<D>
actionActionType
previousStateTableState<D>
instance?TableInstance<D>

Returns

TableState<D>

Inherited from

TableOptions.stateReducer


title?

optional title: ReactNode;

Toolbar title

Inherited from

TableOptions.title


useControlledState()?

optional useControlledState: (state, meta) => TableState<D>;

Parameters

ParameterType
stateTableState<D>
metaMetaBase<D>

Returns

TableState<D>

Inherited from

TableOptions.useControlledState