How to handle check-able tree-view nodes that act as both a group and an item

by rssfrncs   Last Updated January 11, 2019 11:16 AM

I need to create a tree-view which allows users to select nodes (using a checkbox). The tree-view contains two types of node, "group" and "item". A "group" node can contain both "group" and "item" nodes. An item node can't contain other nodes. Crucially selecting a group node should automatically select all node below it (to the bottom of the tree).

However, due to this last criteria I can't figure out the following behaviour (I make reference to the attached diagram).

  1. The user selects Group A
  2. Now Group A, Group B, Item 1 and Item 2 are now checked.
  3. The user then deselects Item 1

What should the state of Group A be (checked, unchecked or indeterminate)?


Tags : checkboxes tree

Related Questions

Updated June 16, 2016 08:06 AM

Updated April 24, 2015 20:06 PM

Updated December 20, 2017 07:16 AM

Updated June 17, 2015 22:07 PM

Updated March 09, 2017 12:16 PM