@homebound/beam 4.47.1 → 4.47.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.js CHANGED
@@ -14533,7 +14533,28 @@ function GridTable(props) {
14533
14533
  return /* @__PURE__ */ jsx54(TableStateContext.Provider, { value: rowStateContext, children: /* @__PURE__ */ jsxs34(PresentationProvider, { fieldProps, wrap: style?.presentationSettings?.wrap, children: [
14534
14534
  /* @__PURE__ */ jsx54("div", { ref: resizeRef, ...trussProps34(getTableRefWidthStyles(as === "virtual", columnMeasureWidth)), ...tid.probe }),
14535
14535
  loading && /* @__PURE__ */ jsx54("div", { ...trussProps34(loadingOverlayCss), ...tid.loadingOverlay, children: /* @__PURE__ */ jsx54(Loader, { ...tid.loadingSpinner, size: "md" }) }),
14536
- as === "card" ? /* @__PURE__ */ jsx54(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition, loading }) : _as === "virtual" ? /* @__PURE__ */ jsx54(VirtualGridTableView, { style: tableStyle, id, columns: layoutColumns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, persistScrollPosition, loading }) : renders[_as](tableStyle, id, layoutColumns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, loading, infiniteScroll, tableContainerRef, persistScrollPosition)
14536
+ as === "card" ? /* @__PURE__ */ jsx54(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition, loading }) : _as === "virtual" ? /* @__PURE__ */ jsx54(
14537
+ VirtualGridTableView,
14538
+ {
14539
+ style,
14540
+ minWidthPx: tableStyle.minWidthPx,
14541
+ id,
14542
+ columns: layoutColumns,
14543
+ visibleDataRows,
14544
+ keptSelectedRows,
14545
+ pinnedRows,
14546
+ firstRowMessage,
14547
+ stickyHeader,
14548
+ xss,
14549
+ virtuosoRef,
14550
+ virtuosoRangeRef,
14551
+ tableHeadRows,
14552
+ stickyOffset,
14553
+ infiniteScroll,
14554
+ persistScrollPosition,
14555
+ loading
14556
+ }
14557
+ ) : renders[_as](tableStyle, id, layoutColumns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, loading, infiniteScroll, tableContainerRef, persistScrollPosition)
14537
14558
  ] }) });
14538
14559
  }
14539
14560
  var loadingOverlayCss = {
@@ -14657,6 +14678,7 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, pinn
14657
14678
  }
14658
14679
  function VirtualGridTableView({
14659
14680
  style,
14681
+ minWidthPx,
14660
14682
  id,
14661
14683
  columns,
14662
14684
  visibleDataRows,
@@ -14689,9 +14711,8 @@ function VirtualGridTableView({
14689
14711
  // the div/table render paths so virtualized tables pin below the global nav + page header.
14690
14712
  TopItemList: React9.forwardRef((props, ref) => /* @__PURE__ */ jsx54("div", { ...props, ref, ...mergeProps14(void 0, {
14691
14713
  ...props.style,
14692
- ...style.minWidthPx !== void 0 ? {
14693
- minWidth: style.minWidthPx
14694
- } : {},
14714
+ // Read from a CSS variable so a width change doesn't recreate this component and remount every row
14715
+ minWidth: `var(${virtualTableMinWidthVar}, auto)`,
14695
14716
  zIndex: zIndices.tableStickyHeader,
14696
14717
  top: stickyTableHeaderOffset(stickyOffset)
14697
14718
  }, {
@@ -14716,6 +14737,9 @@ function VirtualGridTableView({
14716
14737
  overscan: 5,
14717
14738
  ref: virtuosoRef,
14718
14739
  ...loading ? trussProps34(loadingTableCss) : {},
14740
+ style: minWidthPx !== void 0 ? {
14741
+ [virtualTableMinWidthVar]: `${minWidthPx}px`
14742
+ } : void 0,
14719
14743
  ...customScrollParent ? {
14720
14744
  customScrollParent
14721
14745
  } : {},
@@ -14872,6 +14896,7 @@ function CardView({
14872
14896
  }
14873
14897
  } : {} }) });
14874
14898
  }
14899
+ var virtualTableMinWidthVar = "--beam-virtual-table-min-width";
14875
14900
  var VirtualRoot = memoizeOne((gs, _columns, id, xss) => {
14876
14901
  return React9.forwardRef(function VirtualRoot2({
14877
14902
  style,