Hi
1. Select the gantt
2. Select the view from drop down
When i select the different views from drop down and load the gantt again and again based on selection(values come from DB)In this case it is json file . If the data is large then js heap size increases and at one point gantt stop responding.
Support Forum
- Attachments
-
- advanced-forum-test.rar
- (1.3 MiB) Downloaded 103 times
Yes the gantt is created over and over in loadGantt method with this code:
You must create it anew because you destroy its parent (this.panel.destroy()) in getColumnsData function:
Destroying and re-creating a component can be the valid approach in some cases, however, I would first try to reuse the existing component. The reuse could consist of loading new data, changing columns, etc. in an existing component without destroying and re-creating it.
this.gantt = new Gantt({
...ganttConfig,
project: this.project
});
getColumnsData(value) {
this.panel.destroy();
this.project.eventStore.data = [];
this.gantt = null;
this.project = null;
this.panel = null;
this.loadGantt();
}