Skip to Content
APITanStack TablePluginConfigTanstack

PluginConfigTanstack type

Tip

This API reference is automatically generated from the source code  of the @jsoc/react-grid-tanstack  package.

View Declaration

export type PluginConfigTanstack = PluginConfig<ColDefTanstack> & Pick<TableOptions<GridRow>, "columns" | "data" | "getRowId">;

Fields

NameTypeDefault
__columnTypeColDefTanstack

Internal property used to store the column definition type of the grid plugin. This is solely for type inference and not a valid property of the plugin config.

columnsColumnDef<UJSONObject, any>[]

The array of column defs to use for the table.

dataUJSONObject[]

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.

getRowId(originalRow: UJSONObject, index: number, parent?: Row<UJSONObject> | undefined) => 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.