Gantt not working if i change the page and come pack


#1

I use vue-gantt. If i open a page with a gantt and i go to another page and come back, the gantt doesn’t work correctly. I found some post about it but nothing helped.

Does someone has a complete example for Vue with
const ganttChart = Gantt.getGanttInstance()
gantt.destructor()

Thanks in advance.


#2

Hello Peter,
Please, don’t ask the same questions in different topics.

There is something wrong with your code:

const ganttChart = Gantt.getGanttInstance()
gantt.destructor()

Here, you create a new Gantt instance, but then you delete another Gantt instance.

You need to call it like this:

ganttChart.destructor()

I don’t have a Vue demo, but here is how it works in the snippet:
http://snippet.dhtmlx.com/5/5a07eb45c