updateRecursiveSelection<K> static method

List<TreeNode<K>> updateRecursiveSelection<K>(
  1. List<TreeNode<K>> nodes
)

Implementation

static List<TreeNode<K>> updateRecursiveSelection<K>(
    List<TreeNode<K>> nodes) {
  return replaceNodesWithParent(nodes, (parent, node) {
    if (node is TreeItem<K> &&
        !node.selected &&
        parent != null &&
        parent.selected) {
      return node.updateState(selected: true);
    }
    return null;
  });
}