TabView: addView(object view, [number index]) not working for index

I am adding a new view to my TabView and I want it to be the first tab. But when I specify $$(‘myTabView’).addView(myView,0), it does not add it as the first tab.

What is the correct way to add a new tab as the first tab and to focus it immediately?

Thanks!

Anyone?

Again, I am using $$(tabPaneViewID).addView(newTabView,0); This should add the tab as the first tab. Instead, it adds it as the last tab, ignoring the position 0 argument.

You may try adding tabbar options and multiview views separately, as addView() method of the tabview doesn’t really support second parameter. So you can try:

$$(tabPaneViewID).getMultiview().addView(config,0); 
$$(tabPaneViewID).getTabbar().addOption(id, value, show, index); 

Ok I will try that. You need to update the documentation then, because it does state that the 2nd parameter is an index.

http://docs.webix.com/api__link__ui.tabview_addview.html