I created a tabview linked with a list (outside of a the tabview), and in the cell variable (see below), I created a costum template.
var cells = [
{ header:"<span class='contacts_view'>Datatables</span>", body:{
template:
"<div class='contact_container'></div>"
,
}},
{ header:"<span class='webix_icon fa-phone'></span><span class='phones_view'>Phones</span>", body:{
template:
"<div class='phone_container'></div>"
,
}}
]
webix.ui({
view:"tabview",
container:"layout_div",
cells:cells
});
When I click on a contact, it triggers the “onItemClick” which does :
var list_users = webix.ui({
view:"list",
container:"list_users",
select:true,
url:"http://local/users/list",
template:"#lastName# #firstName#",
on: {
"onItemClick":function(id){
var linked_set_contacts = new webix.DataCollection({
url: "http://local/contacts/user/" + id,
});
list_contacts.parse(linked_set_contacts);
var linked_set_phones = new webix.DataCollection({
url: "http://local/phones/user/" + id,
});
list_phones.parse(linked_set_phones);
}
}
});
My problem is that every datatable (list_phones, list_contacts) is loaded when the page is loaded, but the view for phones does not exist at that point since only the first tab is visible.
Is there a way to load every tab ? Or maybe trigger the parse event on the tab click ?