How do I remove lightbox if I don't need it?


#1

How do I remove lightbox if I don’t need it?

because I may wanna use my own edit form modals, or simply I just don’t need it, so for the performance consideration, can I remove the extra lightbox dom and code?


#2

Hello Kevin,
Usually, if you don’t use the lightbox, Gantt doesn’t create a DOM element.
If you want to show your own lightbox, you can redefine the function that shows the built-in lightbox:
https://docs.dhtmlx.com/gantt/desktop__custom_edit_form.html
Here are the examples:
https://snippet.dhtmlx.com/76e1d7197
https://snippet.dhtmlx.com/a1b5ebf55


#3

Thanks Ramil,

Yes, I looked into the source code, and plus your answer, I’m confirmed that If I don’t call getLightBox, the dom element will not be created. thanks Ramil.