Grouped sidebar button failed to fire click event

https://snippet.dhtmlx.com/vfztwmyr

Pls see the link.
Since there’s no select event for sidebar, I use click event.
One of the grouped buttons should be selected, I hope this event be hooked. So I tried to fire a click event on load, but failed. If the navitems are ungrouped, this can work. How can it be fixed.
Thx

Hello @jyginger,

It looks like an issue on our end, as suite looks for groups property, when the actual property name is group.

I sent it to the dev team, and they will try to fix it in future updates.

There is no good workaround for this case. If the requirement is to run some logic on initial load&selection you may create some custom function, and use the select method inside it, like follows:

function customInitialSelection(){
    sidebar.select("dashboard");
    console.log("some custom logic ")
}

customInitialSelection();

Here is a demo:
https://snippet.dhtmlx.com/x8rc5zhx

Kind regards,

Hi Siarhei,
Thanks for ur quick reply and workaround.