@homebound/beam 2.91.8 → 2.91.9

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.
@@ -260,10 +260,16 @@ function renderTable(style, id, columns, headerRows, filteredRows, firstRowMessa
260
260
  function renderVirtual(style, id, columns, headerRows, filteredRows, firstRowMessage, stickyHeader, firstLastColumnWidth, xss, virtuosoRef) {
261
261
  return ((0, jsx_runtime_1.jsx)(react_virtuoso_1.Virtuoso, { ref: virtuosoRef, components: { List: VirtualRoot(style, columns, id, firstLastColumnWidth, xss) },
262
262
  // Pin/sticky both the header row(s) + firstRowMessage to the top
263
- topItemCount: (stickyHeader ? headerRows.length : 0) + (firstRowMessage ? 1 : 0),
264
- // Both the `Item` and `itemContent` use `display: contents`, so their height is 0,
265
- // so instead drill into the 1st real content cell.
266
- itemSize: (el) => el.firstElementChild.firstElementChild.offsetHeight, itemContent: (index) => {
263
+ topItemCount: (stickyHeader ? headerRows.length : 0) + (firstRowMessage ? 1 : 0), itemSize: (el) => {
264
+ const maybeContentsDiv = el.firstElementChild;
265
+ // If it is a chrome row, then we are not using `display: contents;`, return the height of this element.
266
+ if ("chrome" in maybeContentsDiv.dataset) {
267
+ return maybeContentsDiv.offsetHeight;
268
+ }
269
+ // Both the `Item` and `itemContent` use `display: contents`, so their height is 0,
270
+ // so instead drill into the 1st real content cell.
271
+ return maybeContentsDiv.firstElementChild.offsetHeight;
272
+ }, itemContent: (index) => {
267
273
  // We keep header and filter rows separate, but react-virtuoso is a flat list,
268
274
  // so we pick the right header / first row message / actual row.
269
275
  let i = index;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.91.8",
3
+ "version": "2.91.9",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",