Skip to Content
APIGrid CoreBaseGridStore

BaseGridStore class

Tip

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

Members

NameTypeDefault
idstring
optionsGridStoreOptions<C>
#listenersSet<GridStoreListener<C>>
#stateReadonly<{ activeIndex: number; schemas: readonly GridSchemaWithConfig<C>[]; }>
beforeInit() => void

Hook invoked before the store is initialized. Ovveride this to perform any custom logic that must run before the init() method.

init() => void

Initializes the store with a root schema.

newSchema(origin: GridSchemaOrigin<C> | null) => BaseGridSchema<C>

Creates a new schema. This method has protected access modifier to allow subclasses to override it and provide a custom schema implementation if needed.

getSchemaIndex(schema: GridSchema<C>) => number
addChildSchema(origin: GridSchemaOrigin<C>) => void
destroy() => void
getActiveIndex() => number
getActiveSchema() => GridSchemaWithConfig<C>
getChildSchemaOrigin(row: UJSONObject, columnKey: string, parentSchema?: GridSchemaWithConfig<C>) => GridSchemaOrigin<C>
getChildSchema(origin: GridSchemaOrigin<C>) => GridSchemaWithConfig<C> | undefined
getSchema(index: number) => GridSchemaWithConfig<C>
getSchemas() => readonly GridSchemaWithConfig<C>[]
getTotalSchemas() => number
getTotalChildSchemas() => number
isActiveSchema(schema: GridSchemaWithConfig<C>) => boolean
hasChildSchema(origin: GridSchemaOrigin<C>) => boolean
removeChildSchema(childSchema?: GridSchemaWithConfig<C> | undefined) => void
setActiveIndex(activeIndex: number) => void
subscribe(listener: GridStoreListener<C>) => () => void
toggleChildSchema(origin: GridSchemaOrigin<C>) => void
#notify(previousState: Readonly<{ activeIndex: number; schemas: readonly GridSchemaWithConfig<C>[]; }>, state: Readonly<{ activeIndex: number; schemas: readonly GridSchemaWithConfig<C>[]; }>) => void
#setState(state: Partial<Readonly<{ activeIndex: number; schemas: readonly GridSchemaWithConfig<C>[]; }>>) => void