Unplanned
Last Updated: 29 Jul 2025 09:22 by ADMIN

When enabling the showSelectAll option in a checkbox column on the TreeList component, a checkbox is rendered with the TreeListSelectAllCheckboxDirective. In its constructor, this directive includes some logic that causes the TreeList to instantiate a new ViewCollection every time a selection change occurs. However, the call to ViewCollection.loadView() does not pass the service responsible for determining expanded nodes, so the default fallback (which returns true for all nodes) is used.

Problem

As a result, every checkbox interaction triggers fetchChildren() for all nodes, even those that were never expanded or loaded. This leads to:

  • Unnecessary and potentially expensive backend calls

  • Performance degradation, especially with large datasets

  • Inefficient "select all" logic that does not respect the current loaded/visible state

This behavior appears to ignore the fact that TreeList is configured for remote data binding with lazy-loaded children.

Expected Behavior

  • showSelectAll should only evaluate the currently loaded and visible items

  • fetchChildren() should not be called for every node

  • Integration with remote/lazy-loaded data should be respected

Suggested Solutions

  1. Update TreeListSelectAllCheckboxDirective to properly integrate with the expanded node detection logic or allow injection of a custom service.

  2. Provide an override or callback to control the behavior of the "select all" checkbox manually in remote scenarios.

Steps to Reproduce

  1. Configure a TreeList with hasChildren and children to fetch child nodes lazily.

  2. Enable selection with checkbox column and showSelectAll: true.

  3. Click any checkbox inside the TreeList.

  4. Observe that fetchChildren() is triggered for all nodes, not just expanded ones.

StackBlitz repro:

Open console and click on the first cell. 

https://stackblitz.com/edit/angular-e2ai4pjx?file=src%2Fapp%2Fapp.component.ts,angular.json

 

Declined
Last Updated: 11 Jul 2022 14:36 by ADMIN
Created by: Kevin
Comments: 2
Category: TreeList
Type: Bug Report
1

Autosize on treelist with locked columns does not work

When the width of the grid exceeds the column lengths, you would expect autosize to expand and fill the rest of the space evenly.

https://stackblitz.com/edit/angular-7rxada-84kfzy?file=src/app/app.component.ts

Similar to https://github.com/telerik/kendo-angular/issues/3248