Skip to main content

scroll()

Description

Moves the Kanban view to a specific element

Usage

scroll({
id: string | number,
to: "column" | "row" | "card",
options?: object
}): void;

Parameters

  • id - (required) the ID of the element to scroll to
  • to - (required) specifies the element type to scroll to; can be "column", "row", or "card"
  • options - (optional) an object containing scrolling options. A full list of the available parameters is available 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: This method was introduced in version 1.2