Hide or Remove/reconstruct tabview

Hello,

I am currently working with a list of users who have a specific type (user, power_user, etc).
Depending on those types, the tabview attached to the user has to have more or less tabs.
So, for instance, when I click on a user with the type ‘simple_user’, one of the tabs has to be hidden, or removed. And when I click on a ‘power_user’ user, the tab has to be active and shown again.

I didn’t find a solution since the hide method isn’t working with the tabview.
I tried to remove the tab then reconstruct the tabview, but the reconstruct method failed as well

I put a snippet with a basic idea of what I want to do with the reconstruct method below :

http://webix.com/snippet/074da52d

Is there any solution to hide or remove then reconstruct the tab ?

There is no native solution for tab hiding, but you can use something like next

http://webix.com/snippet/1ae9d509

This code does modify only top line of tabview ( the tabbar control ) by removing one of options ( tab ) or by restoring the original list of options ( tabs )

Thanks for the help.

I still have an issue though.

When the tabbar is refreshed, the content of the removed tab is erased, which is obviously not what I want…

Is there a way to refresh the content of the tab as well ?

Check the updated snippet.

http://webix.com/snippet/b72ed44a

Here the tabs and views are separated, so removing the tab will not destroy the related view.