Skip to Content
APITanStack TableGridStoreTanstack

GridStoreTanstack type

Tip

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

View Declaration

export type GridStoreTanstack = GridStore<PluginConfigTanstack>;

Fields

NameTypeDefault
idstring
optionsGridStoreOptions<PluginConfigTanstack>
addChildSchema(origin: GridSchemaOrigin<PluginConfigTanstack>) => void

Adds a new child grid schema to the store.

destroy() => void

Destroys the store.

getActiveIndex() => number

Gets the active index.

getActiveSchema() => GridSchemaWithConfig<PluginConfigTanstack>

Gets the currently active grid schema.

getChildSchemaOrigin(row: UJSONObject, columnKey: string, parentSchema?: GridSchemaWithConfig<PluginConfigTanstack> | undefined) => GridSchemaOrigin<...>

Builds a GridSchemaOrigin for a cell on the given parent schema (active schema by default).

getChildSchema(origin: GridSchemaOrigin<PluginConfigTanstack>) => GridSchemaWithConfig<PluginConfigTanstack> | undefined

Gets the child grid schema opened from the given cell on the parent schema.

getSchema(index: number) => GridSchemaWithConfig<PluginConfigTanstack>

Gets the grid schema at the given index.

getSchemas() => readonly GridSchemaWithConfig<PluginConfigTanstack>[]

Gets all grid schemas on the current navigation path.

getTotalSchemas() => number

Gets the number of grid schemas in the store.

getTotalChildSchemas() => number

Gets the number of child grid schemas in the store.

hasChildSchema(origin: GridSchemaOrigin<PluginConfigTanstack>) => boolean

Returns whether a child schema exists on the navigation path for the given parent cell.

isActiveSchema(gridSchema: GridSchemaWithConfig<PluginConfigTanstack>) => boolean

Checks if the given grid schema is the active schema.

removeChildSchema(childSchema?: GridSchemaWithConfig<PluginConfigTanstack> | undefined) => void

Removes the given child schema. If no child schema is provided, it removes the active child schema.

setActiveIndex(index: number) => void

Sets the active index.

toggleChildSchema(origin: GridSchemaOrigin<PluginConfigTanstack>) => void

Opens a child schema for the given cell, or closes it when already open.

subscribe(listener: GridStoreListener<PluginConfigTanstack>) => () => void

Adds a listener to the store. Listener is called on every state change.