Skip to main content

api.setNext()

Description

Enables inserting a specific action into the Event Bus sequence.

Usage

api.setNext(next: any): void;

Parameters

  • next - (required) the action to be added into the Event Bus sequence

Example

const url = "https://some_backend_url";
const restProvider = new kanban.RestDataProvider(url);

Promise.all([
restProvider.getCards(),
restProvider.getColumns(),
restProvider.getRows()
]).then(([cards, columns, rows]) => {
const board = new kanban.Kanban("#root", {
cards,
columns,
rows,
rowKey: "row"
});
board.api.setNext(restProvider);
});
info

Including RestDataProvider in the Event Bus sequence is necessary to handle data operations like adding, deleting, and to send the related requests to the server.