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

Absence of gantt-container check for existing #436

Open
ArtemOstapov opened this issue Sep 19, 2024 · 0 comments
Open

Absence of gantt-container check for existing #436

ArtemOstapov opened this issue Sep 19, 2024 · 0 comments

Comments

@ArtemOstapov
Copy link

If i use own react wrapper the gantt-container div created 2 times with corresponding inside divs.

22222222222222

Could you plz add for that code checks for existing it like with svg you have

// wrapper element
this.$container = document.createElement('div');
this.$container.classList.add('gantt-container');

to

// wrapper element
this.$container = document.querySelector('.gantt-container');

if (!this.$container) {
    this.$container = document.createElement('div');
    this.$container.classList.add('gantt-container');
}

and

// popup wrapper
this.popup_wrapper = document.createElement('div');
this.popup_wrapper.classList.add('popup-wrapper');
this.$container.appendChild(this.popup_wrapper);

to

 this.popup_wrapper = this.$container.querySelector('.popup-wrapper');

if (!this.popup_wrapper) {
    this.popup_wrapper = document.createElement('div');
    this.popup_wrapper.classList.add('popup-wrapper');
    this.$container.appendChild(this.popup_wrapper);
}
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

1 participant