Asynchronous Views
webix.ajax()
A Promise Returned by config() of a Class View
//views/statistics.js
import {JetView} from "webix-jet";
export class StatisticsView extends JetView {
config() {
return webix.ajax("data/colors").then( data => {
const colors = data.json();
const chart = { view:"chart", series:[]};
for (let i = 0; i < colors.length; i++)
chart.series.push({
value:"#"+i+"#", color:colors[i]
});
return chart;
});
}
}A Simple View as a Promise
data.waitData
webix.promise
Waiting for Data from Multiple Sources
A Simple View that Returns a Promise
Promises in Class Views
Last updated