Kendo Angular Treelist selection not updated when clicking on icon

1 Answer 39 Views
TreeList
Centric EU
Top achievements
Rank 1
Centric EU asked on 21 Dec 2022, 10:45 AM

See this example:
https://stackblitz.com/edit/angular-7nulmk?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.module.ts,package.json

 

- When the icon is clicked, the row in the treelist is not selected.

- When k-icon class is removed from the span, it works: selection is updated

 

 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 23 Dec 2022, 10:07 AM

Hi,

Indeed this is expected since clicking the icon is considered another action. To select a row when the span is clicked, configure the TreeList to persist the selected rows:

https://www.telerik.com/kendo-angular-ui-develop/components/treelist/selection/#toc-persisting-row-selection

add and/or remove the row manually to the selected rows collection inside its click event handler. Here is the updated example that demonstrates the suggested approach in action:

https://stackblitz.com/edit/angular-7nulmk-cgusmk

Please keep in mind that the demonstrated example relies on custom logic which might need further modifications and adjustments to meet the specific project requirements. Any further changes on the matter should be considered a developer effort.

I hope this helps.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
TreeList
Asked by
Centric EU
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or