Hi, i’m trying to update the sections collection of my timeline,
but i only got success in inserting data.
When i try to remove, the GUI don’t update
And after try to pass a empty array to updateCollection method,
i can’t insert more itens too, the GUI don’t get updated again.
scheduler.createTimelineView({
...
y_unit: scheduler.serverList("timeline_sections", self.sections),
...
});
Then you’ll be able to use .updateCollection.
One more thing:self.sections.push({key: "test", label: "test"});
scheduler.updateCollection("timeline_sections", self.sections);It may not work due to inner implementation of updateCollection method, you can’t update collection with the same object you’ve used to initialize it(in case of deleting you create a new empty array object, so it will work correctly). If you copy array before passing it to .updateCollection everything should work as expected:self.sections.push({key: "test", label: "test"});
scheduler.updateCollection("timeline_sections", self.sections.slice(0)); docs.dhtmlx.com/scheduler/api__s … rlist.html docs.dhtmlx.com/scheduler/api__s … ction.html
I still can’t seem to get the GUI to update when deleting a section, even after making a copy of the array before passing into .updateCollection, is that an issue with .updateCollection or am I doing something wrong?