@ni/nimble-components 7.7.0 → 7.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18245,6 +18245,7 @@
18245
18245
  (function (TreeViewSelectionMode) {
18246
18246
  TreeViewSelectionMode["All"] = "all";
18247
18247
  TreeViewSelectionMode["LeavesOnly"] = "leaves-only";
18248
+ TreeViewSelectionMode["None"] = "none";
18248
18249
  })(TreeViewSelectionMode || (TreeViewSelectionMode = {}));
18249
18250
 
18250
18251
  /* eslint-disable */
@@ -18543,8 +18544,9 @@
18543
18544
  return;
18544
18545
  }
18545
18546
  const leavesOnly = this.treeView?.selectionMode === TreeViewSelectionMode.LeavesOnly;
18547
+ const all = this.treeView?.selectionMode === TreeViewSelectionMode.All;
18546
18548
  const hasChildren = this.hasChildTreeItems();
18547
- if ((leavesOnly && !hasChildren) || !leavesOnly) {
18549
+ if ((leavesOnly && !hasChildren) || all) {
18548
18550
  const selectedTreeItem = this.getImmediateTreeItem(this.treeView?.currentSelected);
18549
18551
  // deselect currently selected item if different than this instance
18550
18552
  if (selectedTreeItem && this !== this.treeView?.currentSelected) {
@@ -18553,7 +18555,7 @@
18553
18555
  this.selected = true;
18554
18556
  }
18555
18557
  else {
18556
- // implicit hasChildren && leavesOnly, so only allow expand/collapse, not select
18558
+ // implicit (hasChildren && leavesOnly) || none, so only allow expand/collapse, not select
18557
18559
  this.expanded = !this.expanded;
18558
18560
  }
18559
18561
  // don't allow base class to process click event