I am trying to create a multiview where each view is a different data table. My idea was to declare the data tables separately, and then dump their references in a multiview object at the end. But this doesn’t seem to work. I get the first datatable to show up, but no tabs, and no second table. Here is a sample of my code:
<div id="mainPanelArea"></ div>
<script type="text/javascript">
webix.ready(function() {
//TABLE 1
var table1 = new webix.ui({
id:"table1ID",
view:"datatable",
columns: [...],
...
});
//TABLE2
var table2 = new webix.ui({
id:"table2ID",
view:"datatable",
columns: [...],
...
});
//TAB BAR
var tabbar = {
view: "segmented",
multiview: true,
options: [
{ value: "tab1", id: "table1ID" },
{ value: "tab2", id: "table2ID" }
],
height: 40
};
//MAIN PANEL VIEWS
var mainPanelViews = {
cells: [
table1,
table2
];
};
//UI LAYOUT
webix.ui({
container: "mainPanelArea",
rows: [
tabbar,
mainPanelViews
]
});
}); //end webix.ready
</ script>
Did I make a mistake? I copied the format of the example on multiviews.