Skip to main content

attach()

attaches a DHTMLX component into a Tabbar cell

attach(component: string | object, config?: object): object;

Parameters:

  • component: string | object - the name or object of a component
  • config: object - optional, the configuration settings of a component

Returns:

The object of the attached component.

Example

const tabbar = new dhx.Tabbar("tabbar_container", {
mode: "top",
css: "dhx_widget--bordered",
views: [
{ tab: "list", id: "list" },
{ tab: "dataview", id: "dataview" }
]
});

const dataview = new dhx.DataView(null, {
template: dataviewTemplate,
itemsInRow: 3,
gap: "10px"
});

dataview.data.parse(dataset);

tabbar.getCell("dataview").attach(dataview);

Related sample: Tabbar. Attach widget

note

The DHTMLX Message, Popup, Window components can't be attached to the Tabbar cell because these components can't have the parent container due to their architecture principles.