I am working on an integration of Gantt with Salesforce and I am having a problem filtering tasks. Each time I apply filters and render the Gantt(with filtered tasks), I am having to reinitialize the Gantt(causing multiple instances to be created). This, in turn, causes issues while editing tasks in the light box. Each time I click to open a task, lightboxes equalling the number of instances created so far get triggered and opened. So, editing of tasks are rendered not possible. I have tried the following workarounds, but none of them seem to respond.
- Rerendering the Gantt
- Checking if multiple instances of gantt are created with a flag variable and only parsing existing data
- Attempting to use clearAll() to clear existing Gantt data
- Using destructor to destroy existing instances.
- Attaching events only if gantt instance has been newly created.
How do we retrieve exisitng Gantt instances? Is it possible to isolate creating the Gantt instances and parsing it multiple times?