scroll()
Description
Moves the Kanban view to bring the specified element into focus.
Usage
scroll({
id: string | number,
to: "column" | "row" | "card",
options?: object
}): void;
Parameters
id- (required) the identifier of the element to scroll toto- (required) specifies the type of element to scroll to. Options include "column", "row", or "card"options- (optional) an object with scrolling settings. You can find the full list of parameters for scrolling here
Example
// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// scroll Kanban to the card with the 246 ID
board.scroll({
id: 246,
to: "card",
options: {
behavior: "smooth",
block: "end",
inline: "nearest"
}
});
Change log: The method was introduced in v1.2