Skip to content

SeizenTableInstance

Defined in: packages/core/src/table/useSeizenTable.ts:84

Instance returned by useSeizenTable

TData

clearSelection: () => void

Defined in: packages/core/src/table/useSeizenTable.ts:104

Clear all row selections.

void


eventBus: object

Defined in: packages/core/src/table/useSeizenTable.ts:261

Event bus for plugin communication. Use this to emit custom events that plugins can subscribe to.

emit: <K>(event, payload) => void

Emit an event to all subscribers

K extends keyof SeizenTableEventMap<unknown> | string & object

K

K extends keyof SeizenTableEventMap<unknown> ? SeizenTableEventMap<unknown>[K<K>] : unknown

void

subscribe: <K>(event, callback) => () => void

Subscribe to an event

K extends keyof SeizenTableEventMap<unknown> | string & object

K

(payload) => void

Unsubscribe function

(): void

void

// Emit a custom event
table.eventBus.emit("my-custom-event", { data: "value" });

getColumnOrder: () => ColumnOrderState

Defined in: packages/core/src/table/useSeizenTable.ts:218

Get the current column order.

ColumnOrderState

Array of column IDs in order


getColumns: () => SeizenTableColumn<TData>[]

Defined in: packages/core/src/table/useSeizenTable.ts:186

Get the column definitions.

SeizenTableColumn<TData>[]

Array of column definitions


getColumnVisibility: () => VisibilityState

Defined in: packages/core/src/table/useSeizenTable.ts:196

Get the current column visibility state.

VisibilityState

Object mapping column IDs to visibility (true = visible)


getData: () => TData[]

Defined in: packages/core/src/table/useSeizenTable.ts:180

Get the current table data.

TData[]

Array of row data


getFilterState: () => ColumnFiltersState

Defined in: packages/core/src/table/useSeizenTable.ts:114

Get the current column filter state.

ColumnFiltersState

Array of column filters


getGlobalFilter: () => string

Defined in: packages/core/src/table/useSeizenTable.ts:126

Get the current global filter value.

string

Global filter string


getPaginationState: () => PaginationState

Defined in: packages/core/src/table/useSeizenTable.ts:158

Get the current pagination state.

PaginationState

Pagination state including pageIndex and pageSize


getSelectedRows: () => TData[]

Defined in: packages/core/src/table/useSeizenTable.ts:93

Get the currently selected rows.

TData[]

Array of selected row data


getSortingState: () => SortingState

Defined in: packages/core/src/table/useSeizenTable.ts:142

Get the current sorting state.

SortingState

Array of sorting configurations


moveColumn: (columnId, toIndex) => void

Defined in: packages/core/src/table/useSeizenTable.ts:231

Move a column to a new position.

string

The column ID to move

number

The target index

void


plugin: PluginControl

Defined in: packages/core/src/table/useSeizenTable.ts:245

Plugin control interface.


plugins: SeizenTablePlugin<any>[]

Defined in: packages/core/src/table/useSeizenTable.ts:240

Plugins registered with this table.


readonly remote: boolean | RemoteOptions

Defined in: packages/core/src/table/useSeizenTable.ts:285

Remote Mode configuration.

  • false when not in Remote Mode
  • true when in Remote Mode without totalRowCount (e.g., cursor pagination without total)
  • { totalRowCount: number } when in Remote Mode with totalRowCount

Plugins can use this to adjust their behavior.

if (table.remote) {
// Hide global search in Remote Mode
return null;
}
// Access totalRowCount for pagination (check if it's an object first)
const total = typeof table.remote === 'object' ? table.remote.totalRowCount : undefined;

setColumnOrder: (order) => void

Defined in: packages/core/src/table/useSeizenTable.ts:224

Set the column order.

ColumnOrderState

Array of column IDs in desired order

void


setColumnVisibility: (visibility) => void

Defined in: packages/core/src/table/useSeizenTable.ts:202

Set column visibility state.

VisibilityState

Object mapping column IDs to visibility

void


setFilter: (filter) => void

Defined in: packages/core/src/table/useSeizenTable.ts:120

Set column filters programmatically.

ColumnFiltersState

Column filter state to apply

void


setGlobalFilter: (value) => void

Defined in: packages/core/src/table/useSeizenTable.ts:132

Set the global filter value.

string

Filter string to apply across all columns

void


setPageIndex: (index) => void

Defined in: packages/core/src/table/useSeizenTable.ts:164

Set the current page index (0-based).

number

Page index to navigate to

void


setPageSize: (size) => void

Defined in: packages/core/src/table/useSeizenTable.ts:170

Set the number of rows per page.

number

Number of rows to display per page

void


setSelectedRows: (rows) => void

Defined in: packages/core/src/table/useSeizenTable.ts:99

Set the selected rows programmatically.

TData[]

Array of row data to select

void


setSorting: (sorting) => void

Defined in: packages/core/src/table/useSeizenTable.ts:148

Set sorting programmatically.

SortingState

Sorting state to apply

void


toggleColumnVisibility: (columnId) => void

Defined in: packages/core/src/table/useSeizenTable.ts:208

Toggle visibility of a specific column.

string

The column ID to toggle

void