afterUnSelect
Description
Fires after unselecting an item
Usage
afterUnSelect: (
id: string | number,
subId?: string | number | undefined
) => void;
Parameters
The callback of the event takes the following parameters:
id
- (required) the item idsubId
- (optional) the id of a subheader of a swimlane or a text element of a line
Example
// initializing Diagram
const diagram = new dhx.Diagram("diagram_container", {
type: "org",
select: true
});
// loading data
diagram.data.parse(data);
// attaching a handler to the event
diagram.events.on("AfterUnSelect", function (id) {
console.log(diagram.data.getItem(id).text + " was unselected");
});
Change log: The subId parameter has been added in v4.1
Related sample: Diagram. Org chart mode. Events
Related articles: