TableOptions

Properties

Link copied to clipboard
abstract var autoResetAll: Boolean?

Set this option to override any of the autoReset... feature options. API Docs Guide

Link copied to clipboard
abstract var autoResetExpanded: Boolean?

Enable this setting to automatically reset the expanded state of the table when expanding state changes. API Docs Guide

Link copied to clipboard

If set to true, pagination will be reset to the first page when page-altering state changes eg. data is updated, filters change, grouping changes, etc. API Docs Guide

Link copied to clipboard

Enables or disables right-to-left support for resizing the column. defaults to 'ltr'. API Docs Guide

Link copied to clipboard

Determines when the columnSizing state is updated. onChange updates the state when the user is dragging the resize handle. onEnd updates the state when the user releases the resize handle. API Docs Guide

Link copied to clipboard

The array of column defs to use for the table. API Docs Guide

Link copied to clipboard
abstract var data: ReadonlyArray<TData>

The data for the table to display. This array should match the type you provided to table.setRowType<...>. Columns can access this data via string/index or a functional accessor. When the data option changes reference, the table will reprocess the data. API Docs Guide

Link copied to clipboard
abstract var debugAll: Boolean?

Set this option to true to output all debugging information to the console. API Docs Guide

Link copied to clipboard
abstract var debugCells: Boolean?

Set this option to true to output cell debugging information to the console. API Docs(https://tanstack.com/table/v8/docs/api/core/table#debugcells]

Link copied to clipboard
abstract var debugColumns: Boolean?

Set this option to true to output column debugging information to the console. API Docs Guide

Link copied to clipboard
abstract var debugHeaders: Boolean?

Set this option to true to output header debugging information to the console. API Docs Guide

Link copied to clipboard
abstract var debugRows: Boolean?

Set this option to true to output row debugging information to the console. API Docs Guide

Link copied to clipboard
abstract var debugTable: Boolean?

Set this option to true to output table debugging information to the console. API Docs Guide

Link copied to clipboard
abstract var defaultColumn: ColumnDef<TData, *>?

Default column options to use for all column defs supplied to the table. API Docs Guide

Link copied to clipboard

Enables/disables column filtering for all columns. API Docs Guide

Link copied to clipboard

Enables/disables column pinning for the table. Defaults to true. API Docs Guide

Link copied to clipboard

Enables or disables column resizing for the column. API Docs Guide

Link copied to clipboard
abstract var enableExpanding: Boolean?

Enable/disable expanding for all rows. API Docs Guide

Link copied to clipboard
abstract var enableFilters: Boolean?

Enables/disables all filtering for the table. API Docs Guide

Link copied to clipboard

Enables/disables global filtering for all columns. API Docs Guide

Link copied to clipboard
abstract var enableGrouping: Boolean?

Enables/disables grouping for the table. API Docs Guide

Link copied to clipboard
abstract var enableHiding: Boolean?

Whether to enable column hiding. Defaults to true. API Docs Guide

Link copied to clipboard
abstract var enableMultiRemove: Boolean?

Enables/disables the ability to remove multi-sorts API Docs Guide

Link copied to clipboard
abstract var enableMultiRowSelection: (row: Row<TData>) -> Boolean?
Link copied to clipboard
abstract var enableMultiSort: Boolean?

Enables/Disables multi-sorting for the table. API Docs Guide

Link copied to clipboard
abstract var enablePinning: Boolean?
Link copied to clipboard
abstract var enableRowPinning: (row: Row<TData>) -> Boolean?

Enables/disables row pinning for the table. Defaults to true. API Docs Guide

Link copied to clipboard
abstract var enableRowSelection: (row: Row<TData>) -> Boolean?
Link copied to clipboard
abstract var enableSorting: Boolean?

Enables/Disables sorting for the table. API Docs Guide

Link copied to clipboard

Enables/Disables the ability to remove sorting for the table.

Link copied to clipboard
abstract var enableSubRowSelection: (row: Row<TData>) -> Boolean?

Enables/disables automatic sub-row selection when a parent row is selected, or a function that enables/disables automatic sub-row selection for each row. (Use in combination with expanding or grouping features) API Docs Guide

Link copied to clipboard

By default, filtering is done from parent rows down (so if a parent row is filtered out, all of its children will be filtered out as well). Setting this option to true will cause filtering to be done from leaf rows up (which means parent rows will be included so long as one of their child or grand-child rows is also included). API Docs Guide

Link copied to clipboard
abstract var getColumnCanGlobalFilter: (column: Column<TData, *>) -> Boolean?

If provided, this function will be called with the column and should return true or false to indicate whether this column should be used for global filtering.

Link copied to clipboard
abstract var getCoreRowModel: (table: Table<TData>) -> () -> RowModel<TData>

This required option is a factory for a function that computes and returns the core row model for the table. API Docs Guide

Link copied to clipboard
abstract var getExpandedRowModel: (table: Table<TData>) -> () -> RowModel<TData>?

This function is responsible for returning the expanded row model. If this function is not provided, the table will not expand rows. You can use the default exported getExpandedRowModel function to get the expanded row model or implement your own. API Docs Guide

Link copied to clipboard
abstract var getFacetedMinMaxValues: (table: Table<TData>, columnId: String) -> () -> JsTuple2<Int, Int>??
Link copied to clipboard
abstract var getFacetedRowModel: (table: Table<TData>, columnId: String) -> () -> RowModel<TData>?
Link copied to clipboard
abstract var getFacetedUniqueValues: (table: Table<TData>, columnId: String) -> () -> JsMap<Any, Int>?
Link copied to clipboard
abstract var getFilteredRowModel: (table: Table<TData>) -> () -> RowModel<TData>?

If provided, this function is called once per table and should return a new function which will calculate and return the row model for the table when it's filtered.

Link copied to clipboard
abstract var getGroupedRowModel: (table: Table<TData>) -> () -> RowModel<TData>?

Returns the row model after grouping has taken place, but no further. API Docs Guide

Link copied to clipboard
abstract var getIsRowExpanded: (row: Row<TData>) -> Boolean?

If provided, allows you to override the default behavior of determining whether a row is currently expanded. API Docs Guide

Link copied to clipboard
abstract var getPaginationRowModel: (table: Table<TData>) -> () -> RowModel<TData>?

Returns the row model after pagination has taken place, but no further.

Link copied to clipboard
abstract var getRowCanExpand: (row: Row<TData>) -> Boolean?

If provided, allows you to override the default behavior of determining whether a row can be expanded. API Docs Guide

Link copied to clipboard
abstract var getRowId: (originalRow: TData, index: Int, parent: Row<TData>?) -> String?

This optional function is used to derive a unique ID for any given row. If not provided the rows index is used (nested rows join together with . using their grandparents' index eg. index.index.index). If you need to identify individual rows that are originating from any server-side operations, it's suggested you use this function to return an ID that makes sense regardless of network IO/ambiguity eg. a userId, taskId, database ID field, etc.

Link copied to clipboard
abstract var getSortedRowModel: (table: Table<TData>) -> () -> RowModel<TData>?

This function is used to retrieve the sorted row model. If using server-side sorting, this function is not required. To use client-side sorting, pass the exported getSortedRowModel() from your adapter to your table or implement your own. API Docs Guide

Link copied to clipboard
abstract var getSubRows: (originalRow: TData, index: Int) -> ReadonlyArray<TData>?

This optional function is used to access the sub rows for any given row. If you are using nested rows, you will need to use this function to return the sub rows object (or undefined) from the row.

Link copied to clipboard

The filter function to use for global filtering.

Link copied to clipboard

Grouping columns are automatically reordered by default to the start of the columns list. If you would rather remove them or leave them as-is, set the appropriate mode here. API Docs Guide

Link copied to clipboard

Use this option to optionally pass initial state to the table. This state will be used when resetting various table states either automatically by the table (eg. options.autoResetPageIndex) or via functions like table.resetRowSelection(). Most reset function allow you optionally pass a flag to reset to a blank/default state instead of the initial state.

Link copied to clipboard
abstract var isMultiSortEvent: (e: Any) -> Boolean?

Pass a custom function that will be used to determine if a multi-sort event should be triggered. It is passed the event from the sort toggle handler and should return true if the event should trigger a multi-sort. API Docs Guide

Link copied to clipboard
abstract var keepPinnedRows: Boolean?

When false, pinned rows will not be visible if they are filtered or paginated out of the table. When true, pinned rows will always be visible regardless of filtering or pagination. Defaults to true. API Docs Guide

Link copied to clipboard
abstract var manualExpanding: Boolean?

Enables manual row expansion. If this is set to true, getExpandedRowModel will not be used to expand rows and you would be expected to perform the expansion in your own data model. This is useful if you are doing server-side expansion. API Docs Guide

Link copied to clipboard
abstract var manualFiltering: Boolean?

Disables the getFilteredRowModel from being used to filter data. This may be useful if your table needs to dynamically support both client-side and server-side filtering. API Docs Guide

Link copied to clipboard
abstract var manualGrouping: Boolean?

Enables manual grouping. If this option is set to true, the table will not automatically group rows using getGroupedRowModel() and instead will expect you to manually group the rows before passing them to the table. This is useful if you are doing server-side grouping and aggregation. API Docs Guide

Link copied to clipboard
abstract var manualPagination: Boolean?

Enables manual pagination. If this option is set to true, the table will not automatically paginate rows using getPaginationRowModel() and instead will expect you to manually paginate the rows before passing them to the table. This is useful if you are doing server-side pagination and aggregation. API Docs Guide

Link copied to clipboard
abstract var manualSorting: Boolean?

Enables manual sorting for the table. If this is true, you will be expected to sort your data before it is passed to the table. This is useful if you are doing server-side sorting. API Docs Guide

Link copied to clipboard
abstract var maxLeafRowFilterDepth: Int?

By default, filtering is done for all rows (max depth of 100), no matter if they are root level parent rows or the child leaf rows of a parent row. Setting this option to 0 will cause filtering to only be applied to the root level parent rows, with all sub-rows remaining unfiltered. Similarly, setting this option to 1 will cause filtering to only be applied to child leaf rows 1 level deep, and so on. var : This is useful for situations where you want a row's entire child hierarchy to be visible regardless of the applied filter. var * API Docs: * API Docs var * Guide: * Guide

Link copied to clipboard
abstract var maxMultiSortColCount: Int?

Set a maximum number of columns that can be multi-sorted. API Docs Guide

Link copied to clipboard
abstract var mergeOptions: (defaultOptions: TableOptions<TData>, options: TableOptions<TData>) -> TableOptions<TData>?

This option is used to optionally implement the merging of table options. API Docs Guide

Link copied to clipboard
abstract var meta: TableMeta<TData>?

You can pass any object to options.meta and access it anywhere the table is available via table.options.meta. API Docs Guide

Link copied to clipboard

If provided, this function will be called with an updaterFn when state.columnFilters changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. API Docs Guide

Link copied to clipboard

If provided, this function will be called with an updaterFn when state.columnOrder changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. API Docs Guide

Link copied to clipboard

If provided, this function will be called with an updaterFn when state.columnPinning changes. This overrides the default internal state management, so you will also need to supply state.columnPinning from your own managed state. API Docs Guide

Link copied to clipboard

If provided, this function will be called with an updaterFn when state.columnSizing changes. This overrides the default internal state management, so you will also need to supply state.columnSizing from your own managed state. API Docs Guide

Link copied to clipboard

If provided, this function will be called with an updaterFn when state.columnSizingInfo changes. This overrides the default internal state management, so you will also need to supply state.columnSizingInfo from your own managed state. API Docs Guide

Link copied to clipboard

If provided, this function will be called with an updaterFn when state.columnVisibility changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. API Docs Guide

Link copied to clipboard

This function is called when the expanded table state changes. If a function is provided, you will be responsible for managing this state on your own. To pass the managed state back to the table, use the tableOptions.state.expanded option. API Docs Guide

Link copied to clipboard

If provided, this function will be called with an updaterFn when state.globalFilter changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. API Docs Guide

Link copied to clipboard

If this function is provided, it will be called when the grouping state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the tableOptions.state.grouping option. API Docs Guide

Link copied to clipboard

If this function is provided, it will be called when the pagination state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the tableOptions.state.pagination option. API Docs Guide

Link copied to clipboard

If provided, this function will be called with an updaterFn when state.rowPinning changes. This overrides the default internal state management, so you will also need to supply state.rowPinning from your own managed state. API Docs Guide

Link copied to clipboard

If provided, this function will be called with an updaterFn when state.rowSelection changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. API Docs Guide

Link copied to clipboard

If provided, this function will be called with an updaterFn when state.sorting changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. API Docs Guide

Link copied to clipboard
abstract var onStateChange: (updater: Updater<TableState>) -> Unit

The onStateChange option can be used to optionally listen to state changes within the table. API Docs Guide

Link copied to clipboard
abstract var pageCount: Int?

When manually controlling pagination, you can supply a total pageCount value to the table if you know it (Or supply a rowCount and pageCount will be calculated). If you do not know how many pages there are, you can set this to -1. API Docs Guide

Link copied to clipboard

If true expanded rows will be paginated along with the rest of the table (which means expanded rows may span multiple pages). If false expanded rows will not be considered for pagination (which means expanded rows will always render on their parents page. This also means more rows will be rendered than the set page size) API Docs Guide

Link copied to clipboard
abstract var renderFallbackValue: Any

Value used when the desired value is not found in the data. API Docs Guide

Link copied to clipboard
abstract var rowCount: Int?

When manually controlling pagination, you can supply a total rowCount value to the table if you know it. The pageCount can be calculated from this value and the pageSize. API Docs Guide

Link copied to clipboard
abstract var sortDescFirst: Boolean?

If true, all sorts will default to descending as their first toggle state. API Docs Guide

Link copied to clipboard
abstract var state: TableState

The state option can be used to optionally control part or all of the table state. The state you pass here will merge with and overwrite the internal automatically-managed state to produce the final state for the table. You can also listen to state changes via the onStateChange option.