@homebound/beam 2.132.0 → 2.132.1

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.
@@ -31,7 +31,7 @@ function ScrollableParent(props) {
31
31
  (0, react_1.useEffect)(() => {
32
32
  scrollableRef.current.appendChild(scrollableEl);
33
33
  }, [scrollableEl]);
34
- return ((0, jsx_runtime_1.jsx)(ScrollableParentContext.Provider, Object.assign({ value: context }, { children: (0, jsx_runtime_1.jsxs)(Tag, Object.assign({ css: { ...Css_1.Css.mh0.mw0.fg1.df.fdc.$, ...otherXss } }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ css: Css_1.Css.pl(context.pl).pr(context.pr).if(!hasScrollableContent).h100.overflowAuto.$ }, { children: children }), void 0), (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.fg1.overflowAuto.pl(context.pl).pr(context.pr).$, ref: scrollableRef }, void 0)] }), void 0) }), void 0));
34
+ return ((0, jsx_runtime_1.jsx)(ScrollableParentContext.Provider, Object.assign({ value: context }, { children: (0, jsx_runtime_1.jsxs)(Tag, Object.assign({ css: { ...Css_1.Css.mh0.mw0.fg1.df.fdc.$, ...otherXss } }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ css: Css_1.Css.ml(context.pl).pr(context.pr).if(!hasScrollableContent).h100.overflowAuto.$ }, { children: children }), void 0), (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.fg1.overflowAuto.ml(context.pl).pr(context.pr).$, ref: scrollableRef }, void 0)] }), void 0) }), void 0));
35
35
  }
36
36
  exports.ScrollableParent = ScrollableParent;
37
37
  function useScrollableParent() {
@@ -274,6 +274,11 @@ const renders = {
274
274
  /** Renders table using divs with flexbox rows, which is the default render */
275
275
  function renderDiv(style, id, columns, headerRows, totalsRows, filteredRows, firstRowMessage, _stickyHeader, firstLastColumnWidth, xss, _virtuosoRef, tableRef) {
276
276
  return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ ref: tableRef, css: {
277
+ // Use `fit-content` to ensure the width of the table takes up the full width of its content.
278
+ // Otherwise, the table's width would be that of its container, which may not be as wide as the table itself.
279
+ // In cases where we have sticky columns on a very wide table, then the container which the columns "stick" to (which is the table),
280
+ // needs to be as wide as the table's content, or else we lose the "stickiness" once scrolling past width of the table's container.
281
+ ...Css_1.Css.mw("fit-content").$,
277
282
  /*
278
283
  Using (n + 3) here to target all rows that are after the first non-header row. Since n starts at 0, we can use
279
284
  the + operator as an offset.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.132.0",
3
+ "version": "2.132.1",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",