Multiselection in Scrollable Grid with smart rendering extension not working as expected

Using scrollable grid with smart rendering enabled

gantt.config.smart_rendering = true;
gantt.config.static_background = true;

When selecting multiple tasks (using the Windows Shift Key), tasks that are not in the viewport on selection completion are not marked as selected when you scroll back to them.

I have creacted sample code to replicate this issue.

Replication Steps:

  1. Make sure the gantt chart has a vertical scrollbar
  2. Click on the first task in the grid
  3. Scroll down until a few tasks are not in the viewport
  4. Hold the Windows Shift Key and click on another task to allow multiple items to be selected
  5. Scroll up to the first item

You will notice that some of there items were not selected

Thank you for sending the snippet and giving all necessary steps to reproduce the use case. Actually, the tasks are selected, but after they are not highlighted.
You can check that if you use gantt.getSelectedTasks(); command:
And if Gantt renders the chart, the highlight of other tasks will also disappear. To fix that, add the following code:

gantt.templates.task_class = gantt.templates.grid_row_class = gantt.templates.task_row_class = function (start, end, task) {
	if (gantt.isSelectedTask( return "gantt_selected";

Here is the updated snippet:

1 Like

Your fix worked. Thanks