JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Docking Layout › how to create docking layout dynamically using java script and jquery? › Reply To: how to create docking layout dynamically using java script and jquery?
Hi kaltura,
Thank you for getting back to us.
If you want to add new tab in a tab window you can achieve this by adding new object into the ‘items’ array which can be achieved for example as shown in the code below.
var tabsWindowObject =
{
type: ‘LayoutPanel’,
id: ‘Your Id’,
label: ‘Solution Explorer’,
items: [{
label: ‘Solution Explorer’,
content: ‘The content you want to add’
}],
tabPosition: ‘hidden’
};
//New TabĀ object
var newTabInsideTabWindow = {
label: ‘Another Solution Explorer’,
content: ‘Another content you want to add’
}
//Inserting the New Tab in the items array
tabsWindowObject.items.push(newTabInsideTabWindow)
const dockinglayout = document.querySelector(‘smart-docking-layout’);
dockinglayout.insertIntoTop(1,tabsWindowObject);
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
Smart UI Team
https://www.htmlelements.com/