Cannot read property 'reset' of undefined

I created a gantt chart on one of my components (on my application) and I did this onInit:

and did this onDestroy:

When I change to another tab, on my application, and try to get back to the gantt chart, this error appears:

TypeError: Cannot read property ‘reset’ of undefined
at Object.t._reinit (dhtmlxgantt.js:10)
at Object.init (dhtmlxgantt.js:10)
at ProjectPanelPlanChartComponent.push…

Can you help me? Maybe I’m doing something wrong…

Hello Inês,
If you destroy Gantt, you won’t be able to use it again until you reload the page or create a new Gantt instance. The second option is available only in the Enterprise Pro version:

You can reproduce the issue in the snippet:

If you have the Enterprise Pro version, you can use the following command to create a new Gantt instance:

gantt = Gantt.getGanttInstance();

After that, you can initialize Gantt and load the data:


Here is the snippet:

But I only want one instance on my application. I need to pay more?


Hello Inês,
The Standard and commercial Pro versions don’t have the functionality to create a new Gantt instance when Gantt was destroyed.
You are not obligated to buy the Enterprise version to make Gantt work in React.
But in that case, you cannot use the gantt.destroy() command unless you want to refresh the page.
Instead of that, you can use the gantt.clearAll() command to remove all tasks from the chart and manually detach all event handlers.

Thanks. I will do that.
Another question, with commercial Pro Version I have access to the “Pro” elements, right?


Hello Inês,
Unfortunately, it is not clear for me which “Pro” elements you mean. Could you clarify that?
You can also check the difference between the Pro and Standard versions in the following article:

I’m referring to this elements, like for example “Projects and Milestones task types, and others…” because I bought the Commercial plan and says that the plan includes PRO edition just if exists.


Hello Inês,
Thank you for the clarification.
Yes, the commercial version has Project, Milestone and Custom tasks.
Not all DHTMLX products have the Pro version, and that page is for all products.
Here is the licensing page for DHTMLX Gantt:

Thanks for your support.