I am using an interval to re-selects the data for my project to ensure the end user sees changes made by other users. I am using the same endpoints I use to initially load data - but when I set the data property of the datastores - the dependency lines are all removed from scheduler.
We are using scheduler 5.6.7 now and the issue remains.
I am loading the data in this order:
function refreshSheduleData() {
var promiseStack = [];
promiseStack.push(webix.ajax().headers({ "Authorization": userLoggedIn.Token, "Content-type": "application/json" }).get(apipath + "/api/Events/GetResources"));
promiseStack.push(webix.ajax().headers({ "Authorization": userLoggedIn.Token, "Content-type": "application/json" }).get(apipath + "/api/Events/GetEvents"));
promiseStack.push(webix.ajax().headers({ "Authorization": userLoggedIn.Token, "Content-type": "application/json" }).get(apipath + "/api/Events/GetAssignments"));
promiseStack.push(webix.ajax().headers({ "Authorization": userLoggedIn.Token, "Content-type": "application/json" }).get(apipath + "/api/Events/GetDependencies"));
webix.promise.all(promiseStack).then(function (results) {
var resources = results[0].json();
var events = results[1].json();
var assignments = results[2].json();
var dependencies = results[3].json();
scheduler.project.resourceStore.data = resources;
scheduler.project.eventStore.data = events;
scheduler.project.assignmentStore.data = assignments;
scheduler.project.dependencyStore.data =dependencies;
});
}
Initial loading - scheduler looks great
Then the refresh routine runs and all the dependencies are no longer drawn
Once the screen has re-painted with no dependencies, if I apply a filter to the data, the dependencies then appear. So the data is there - its just not being drawn when I initially set the new dependencyStore data. I also tried setting dependencyStore.data = []; and then applying the new data on another line - but this had the same result. All the code fires before the screen has repainted.
This may again be due to the size of the dataset we are using. I had a different issue reported here
viewtopic.php?t=27744&hilit=bfixell&start=10 where the scroll to resource function was firing before the screen repainted and failed.
Perhaps you can use the same data that I sent for that request to test this refresh function.
I am refreshing the scheduler using an interval. The current setting refreshes every 30 seconds for testing, but will be longer once the system is live.
var idt = setInterval(function () {
idleTime = idleTime + 1;
if (idleTime == 6) {
idleTime = 0;
refreshSheduleData()
}
}, 5000);