Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gantt is undefined #107

Open
lfk0719 opened this issue Jan 24, 2024 · 1 comment
Open

Gantt is undefined #107

lfk0719 opened this issue Jan 24, 2024 · 1 comment

Comments

@lfk0719
Copy link

lfk0719 commented Jan 24, 2024

import {gantt,Gantt} from "dhtmlx-gantt";
I use it in vue2. I want to use the method gantt.getganttinstance (). The installed version is 7.1.4, but Gantt is undefined

@gearcoded
Copy link

@lfk0719,
You need to call the getGanttInstance method from the Gantt object, note the capital G:

Gantt.getGanttInstance()

https://docs.dhtmlx.com/gantt/desktop__multiple_gantts.html

There is a demo for Vue.js, but it uses the 3.x versions:
https://github.com/DHTMLX/vue-gantt-demo

However, in the past, there was the 2.x version:
https://github.com/DHTMLX/vue-gantt-demo/tree/1ce7aafbb413a54a0bf2a82974b4e8e8e86c1d27

I tried to reproduce the issue with the getGanttInstance method, but it is working correctly.
Here is the demo:
https://files.dhtmlx.com/30d/c00315bd4ea1a8733447d0fbdaf1b188/vue+gantt-instance.zip

If that doesn't help you, please send me a ready demo with all the necessary files so that I can reproduce the issue locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants