Skip to main content

api.getReactiveState()

Description

Gets an object with the reactive properties of Kanban

Usage

api.getReactiveState(): object;

Returns

The method returns an object with the following parameters:

{
areasMeta: {
subscribe: any,
update: any,
set: any
},
before: {...},
cardShape: {...},
cards: {...},
cardsMap: {...},
cardsMeta: {...},
columnKey: {...},
columns: {...},
dragItemId: {...},
dragItemsCoords: {...},
dropAreaItemsCoords: {...},
dropAreasCoords: {...},
edit: {...},
editorShape: {...},
fromAreaMeta: {...},
overAreaId: {...},
overAreaMeta: {...},
readonly: {...},
rowKey: {...},
rows: {...},
scroll: {...},
search: {...},
selected: {...},
sort: {...}
}

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// subscribe on the card selection
board.api.getReactiveState().selected.subscribe((value) => {
console.log(value);
// other actions
});

Change log: The method was updated in v1.2