Adding context menu to a dynamical added tab

I have a initially empty tabview. In init I ask the server for the current list of tabs and after receiving the data from the server I add the needed tabs.
So add the end of init() the ids of the new tab are not available for webix.ui({}).attachTo($$(“newID”). So I cannot use this method to attach a context menu.
If I try to attach to them I get the error: “Invalid target for Context::attach”.

Any suggestions?

Hi,

If you use custom ajax request and add new tabs via callback, so in the same place is possible to add context menu. Also, you can use promises.