@homebound/beam 4.45.1 → 4.45.2

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.
package/dist/index.cjs CHANGED
@@ -8538,9 +8538,18 @@ var RowState = class {
8538
8538
  }
8539
8539
  /** This row's share of `TableState.selectedLeafRowCount`, see `GridDataRow.childrenCount`. */
8540
8540
  get selectedLeafRowCount() {
8541
- if (this.isReservedKind || !this.selected) return 0;
8541
+ if (this.isReservedKind) return 0;
8542
+ const { childrenCount } = this.row;
8543
+ if (childrenCount !== void 0 && this.isSelected) return this.isCountedByParent ? 0 : childrenCount;
8544
+ if (!this.selected) return 0;
8542
8545
  if (this.children?.some((c) => c.row.selectable !== false)) return 0;
8543
- return this.row.childrenCount ?? 1;
8546
+ return this.isCountedByParent ? 0 : 1;
8547
+ }
8548
+ /** Whether a checked ancestor's `childrenCount` already includes this row. */
8549
+ get isCountedByParent() {
8550
+ const { parent } = this;
8551
+ if (!parent || this.removed) return false;
8552
+ return parent.row.childrenCount !== void 0 && parent.isSelected || parent.isCountedByParent;
8544
8553
  }
8545
8554
  /** The UI state for checked/unchecked + "partially checked" for parents. */
8546
8555
  get selectedState() {