Adding child item to sidebar

How I can add a child to menu item ?
docs does not explain that, as we can only pass index to ‘add’ function:
On the other hand ui.tree allows defining parentId:

And I think sidebar is also based on ui.tree, isn’t it ?

Yes, you are right - Sidebar is a tree-based component and child item can be added the same way as to Tree component.
There is a mistake in our documentation, thanks for noticing, will be fixed.

Just in case you need an example, please, check: Code Snippet
Have a great day!