а

Tabbar : Tabs content is not rendered until tab is clicked


#1

I am creating tabs on a buttons click event.
I wan’t to load content via Ajax but tabs initial content div is not rendered until the tab is clicked.

Here is the code

var tabbar = new dhx.Tabbar("tabbar_container",{
    closeButtons: true
});

layout.cell("content").attach(tabbar);

var tabOptions = {
    id: "1",
    tab: "myTitle",
    css:"panel flex",
    html: "<div id='contentDiv' >Loading Ajax Content</div>"
}
tabbar.addCell(tabOptions);

#2

Just figured out:

in suit.js after 22947 added;

this.config.activeView = id;

in suit.js @ 23018 setTimeout for _focusTab 10ms is too early. Changed it to 15ms.

Tabbar.prototype._focusTab = function (id) {
    var _this = this;
    setTimeout(function () {
        _this.getRootView().refs[id].el.focus();
    }, 15);
};