I click a button and call this code, which adds a row to the treegrid, then I call collapse all and it crashes. is there something I need to do to refresh the state of the treegrid before I call collapseall?
let category = new Category();
category.isParent = true;
category.text = "Test"
this.dataLoadService.data.categories.unshift(category);
let child = new Category();
child.text = "hello";
//category.children=[child]
this.treegrid.refresh();
this.treegrid.collapseAll();
file: ej2-treegrid.es2015.js
Line 5353
this.uniqueIDCollection does not have any values matching record.uniqueID and the grid crashes when collapseall is called.
if (!isChild || isCountRequired(this)) {
record.expanded = false;
this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
}