Skip to main content

api.getState()

Description

Gets an object with the StateStore properties of Booking

Usage

api.getState(): object;

Returns

The method returns an object with the following parameters of state:

{   
cards,
cardShape,
filteredCards,
filterShape,
filterData,
formShape,
... TODO
}

Example

// create Booking
const booking = new booking.Booking("#root", {
cards,
cardShape
});

// get the State of Kanban
const state = booking.api.getState();
console.log(state.cards); // output the cards data
console.log(state.cardShape); // output the card configuration
console.log(state.formShape); // output the editor configuration
//...

Related articles: