I need to add an event (click) on groups, each time i click on a group, it should open a new page, i read through the vis.js timeline documentation and i dont see any event handling on groups, there is only an event click on items but not on groups. The click event on items :
timeline.on("click", function (properties) {
// Check if an item was clicked on
if (properties.item){
// An item was clicked, get the item from dataset
const item = items.get(properties.item);
console.log('click event - title:', item.title);
}
});
is there a visjs method i dont know about ? or is there any way to add an event listener on the groups ? ps : i dont have nested groups.
For anyone wondering about the solution for this problem, this could be done using the timeline options groupTemplate and groupEditable :