TableOptions
Properties
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]
Enables/Disables the ability to remove sorting for the table.
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
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.
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.
Returns the row model after pagination has taken place, but no further.
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.
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.
The filter function to use for global filtering.
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.
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
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
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
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
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.