How can I control the display of QuickInfo


I replaced Tooltip with QuickInfo to display the customized task details. But seems its display is default behavior while clicking task. I’m wondering if I can control if it can be displayed? I tried to control it inside onTaskClick event, but seems the QuickInfo display is after that. Is that possible for me to implement this?


I implemented this by controlling it in quick_info_class and quick_info_content, the code is as below:

gantt.templates.quick_info_class = (start, end, task) => {
  if (isSpecialTasks( return 'hidden-task'
  return 'task-details'
gantt.templates.quick_info_content = (start, end, task) => {
  if (isSpecialTasks( return ''
  return createTaskDetailCard(task)

Class hidden-task has only one line code to set the display to none to hide the task.

You can use the onQuickInfo event handler and hide it using the gantt.ext.quickInfo method:,hide,-()%20-%20hides%20the

Here is an example of how it an be implemented: