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
TableOptions<D>
Type Parameters
| Type Parameter | Default type |
|---|---|
D extends object | object |
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
autoResetSortBy?
optional autoResetSortBy: boolean;
Inherited from
cellProps()?
optional cellProps: (cell) => TableCommonProps;
Function called for each table cell allowing style/className/role props to be overridden
Parameters
| Parameter | Type |
|---|---|
cell | Cell<D, any> |
Returns
TableCommonProps
Inherited from
className?
optional className: string;
Optional method to pass style. Added to table element
Inherited from
columnProps()?
optional columnProps: (column) => TableCommonProps;
Function called for each table column allowing style/className/role props to be overridden
Parameters
| Parameter | Type |
|---|---|
column | Column<D> |
Returns
TableCommonProps
Inherited from
columns
columns: readonly Column<D>[];
Inherited from
data
data: D[];
Inherited from
defaultCanSort?
optional defaultCanSort: boolean;
Inherited from
defaultColumn?
optional defaultColumn: Partial<Column<D>>;
Inherited from
disabledMultiRemove?
optional disabledMultiRemove: boolean;
Inherited from
TableOptions.disabledMultiRemove
disableGlobalFilter?
optional disableGlobalFilter: boolean;
Inherited from
TableOptions.disableGlobalFilter
disableMultiSort?
optional disableMultiSort: boolean;
Inherited from
disableSortBy?
optional disableSortBy: boolean;
Inherited from
disableSortRemove?
optional disableSortRemove: boolean;
Inherited from
TableOptions.disableSortRemove
downloadEnabled?
optional downloadEnabled: boolean;
Enable toolbar with download option
Inherited from
downloadFilename?
optional downloadFilename: string;
Inherited from
downloadFormats?
optional downloadFormats: ("json" | "csv")[];
Inherited from
expandSubRows?
optional expandSubRows: boolean;
Inherited from
filterSelect
filterSelect: FilterSelect<D>;
filterTypes?
optional filterTypes: FilterTypes<D>;
Inherited from
getRowId()?
optional getRowId: (originalRow, relativeIndex, parent?) => string;
Parameters
| Parameter | Type |
|---|---|
originalRow | D |
relativeIndex | number |
parent? | Row<D> |
Returns
string
Inherited from
getSubRows()?
optional getSubRows: (originalRow, relativeIndex) => D[];
Parameters
| Parameter | Type |
|---|---|
originalRow | D |
relativeIndex | number |
Returns
D[]
Inherited from
globalFilter?
optional globalFilter: string | (rows, columnIds, filterValue) => Row<D>[];
Inherited from
headerProps()?
optional headerProps: (header) => TableCommonProps;
Function called for each table header allowing style/className/role props to be overridden
Parameters
| Parameter | Type |
|---|---|
header | HeaderGroup<D> |
Returns
TableCommonProps
Inherited from
initialState?
optional initialState: Partial<TableState<D>>;
Inherited from
isMultiSortEvent()?
optional isMultiSortEvent: (e) => boolean;
Parameters
| Parameter | Type |
|---|---|
e | MouseEvent<Element, MouseEvent> |
Returns
boolean
Inherited from
manualExpandedKey?
optional manualExpandedKey: IdType<D>;
Inherited from
TableOptions.manualExpandedKey
manualGlobalFilter?
optional manualGlobalFilter: boolean;
Inherited from
TableOptions.manualGlobalFilter
manualPagination?
optional manualPagination: boolean;
Inherited from
manualSortBy?
optional manualSortBy: boolean;
Inherited from
maxMultiSortColCount?
optional maxMultiSortColCount: number;
Inherited from
TableOptions.maxMultiSortColCount
orderByFn()?
optional orderByFn: (rows, sortFns, directions) => Row<D>[];
Parameters
| Parameter | Type |
|---|---|
rows | Row<D>[] |
sortFns | OrderByFn<D>[] |
directions | boolean[] |
Returns
Row<D>[]
Inherited from
pageCount?
optional pageCount: number;
Inherited from
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
| Parameter | Type |
|---|---|
row | Row<D> |
Returns
TableCommonProps
Inherited from
sortTypes?
optional sortTypes: Record<string, SortByFn<D>>;
Inherited from
stateReducer()?
optional stateReducer: (newState, action, previousState, instance?) => TableState<D>;
Parameters
| Parameter | Type |
|---|---|
newState | TableState<D> |
action | ActionType |
previousState | TableState<D> |
instance? | TableInstance<D> |
Returns
TableState<D>
Inherited from
title?
optional title: ReactNode;
Toolbar title
Inherited from
useControlledState()?
optional useControlledState: (state, meta) => TableState<D>;
Parameters
| Parameter | Type |
|---|---|
state | TableState<D> |
meta | MetaBase<D> |
Returns
TableState<D>