Skip to main content

api.getState()

Description

Gets an object with the StateStore properties of Kanban

Usage

api.getState(): object;

Returns

The method returns an object with the following parameters:

{   
areasMeta: object,
before: string | number,
cardShape: object,
cards: array,
cardsMap: object,
cardsMeta: object,
columnKey: string,
columns: array,
dragItemId: string | number,
dragItemsCoords: array,
dropAreaItemsCoords: array,
dropAreasCoords: array,
edit: object,
editorShape: array,
fromAreaMeta: object,
overAreaId: string | number,
overAreaMeta: object,
readonly: object,
rowKey: string,
rows: array,
scroll: object,
search: object,
selected: array,
sort: object
}

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// get the StateStore of Kanban
const state = board.api.getState();
console.log(state);

Change log: The method was updated in v1.2