Hello! I have a js parsing function AttachedEvent(‘Parse’, onParse)
onParse => {
gantt.eachTask((task: GanttTask) => {...}
gantt.render()
}
onParse internally iterates through all the tasks and for each task calls a function within which, depending on the condition, we do the following
if (type === TaskType.Project && !gantt.hasChild(id)) {
gantt.silent(() => {
fillerId = gantt.addTask(...)
})
if (fillerId) {
gantt.getTask(fillerId).start_date = new Date(start_date)
gantt.getTask(fillerId).end_date = endDate
gantt.updateTask(fillerId)
}
gantt.render()
}
The question is, do we need to call gantt.render() for each task inside the loop if we still call gantt.render() after the loop ends? This causes some problems when parsing. If you remove gantt.render() for each task inside the loop, there is no problem
P.S. I didn’t write this code, I’m trying to figure it out