Hello,
in the student sample on github there is the student.js model like this:
export const students = new webix.DataCollection({
url:"data/students.json"
});
// for bullet and radar
export function getGrades(id){
return webix.copy(students.getItem(id).grades);
}
//for average-individual chart
export function getStats(id){
const student = students.getItem(id);
return {
stats:student.months,
name:student.name
};
}
I want to use in a view only let’s say the function getGrades()
.
How can I be sure, that the Datacollection is already loaded, when using the function (in my case, the Datacollection is not a json file, but a big rest-request).
Where do I need to put the “waitData”-option or a promise.
The function fills in my case a combobox.
Thanks,
Martin