Tabbar Closable

Hello,

I want only specific one tab closable false.

How to I that it?

Hello;

you could check dhtmlx example here: DHTMLX - Tabbar. Close button

When adding tabs dynamically I want to make one tab closeable false.

For Example,

const tabbar = new dhx.Tabbar(“tabbar”, {
css: “dhx_widget–bordered”,
mode: “top”,
noContent: true,
views: [
{ tab: “tab-1” },
{ tab: “tab-2” },
]
});

let nextTab = 3;

function addTab(index) {
tabbar.addTab({ tab: “tab-” + nextTab++, css: “panel flex” }, index);
}

function removeTab(index) {
const id = tabbar.getId(index);
tabbar.removeTab(id);
}

then I want only tab-1 closable false.

Unfortunately currently such feature is not available.
I’ve sent your request to the dev team and it will be observed.

For now I can only suggest you to use the beforeClose event to control and block the ta closing:

You can change the closable tabs list using the config update.
Something like:
https://snippet.dhtmlx.com/rf3hajxm