Saturday, October 22, 2016

Angular 2 Checkbox Tree with Partial Selection

While working on a new Angular 2 project, we needed a checkbox tree that supports partial selection when only some children nodes are selected.
As we've been using the open source PrimeNG UI components library, it was simple enough to add check-boxes to the PrimeNG tree component using its build-in template support.
The more complicated task was to add the recursive logic required for setting parent selection on each node selection change.
Feel free to explore the demo, fork the source code on Github and use it for your own projects.





No comments:

Post a Comment

About Me

My photo
I've been developing Internet and rich-media application for 15 years. In my work I emphasis usability and best user experience as well as sleek design. My main expertise are JavaScript, Flex and Flash.

Followers