onItemClick works for subitems when the sidebar is expanded, but once collapsed, it stops working for subitems. Can this be fixed or worked around? I don’t want to use onAfterSelect because sometimes I am setting the selected item based on url change and not user interaction.
Try this: You’ll see that you get both Selected and Clicked events when expanded, but when collapsed, you only get Selected events for sub-items.