Click on sidebar selectbutton with items doesn't return id

Hi, i’m new on this forum.
I’m studying the new structure of ver. 6, but there is a strange behaviour:
if I define a selectButton in a sidebar with a id but without items, the “click” event on it gives back the id, if I introduce sub items, the event doesn’t. It returns the id of the sub item of course if I click on that.
Is there a way to know the id of the selectbutton when it has subitems?
Thanks

In thios case you need to use the openMenu event:
https://docs.dhtmlx.com/suite/sidebar__api__sidebar_openmenu_event.html