Skip to main content

getIds()

Description

Returns the list of ids of selected items

Usage

getIds(): (string | number)[]

Returns

The method returns the list of ids of selected items as an array

Example

// a diagram must be created with the "select:true" option
const diagram = new dhx.Diagram("diagram_container", {
select: true
});
// loading data
diagram.data.parse(data);

const ids = diagram.selection.getIds(); // -> ["1", "1.1", ...] or []

Change log: Added in v6.0

Related articles:

Related samples: Diagram. Selection. Item selection