@homebound/beam 2.95.1 → 2.95.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.
|
@@ -120,7 +120,7 @@ function GridTable(props) {
|
|
|
120
120
|
stickyOffset,
|
|
121
121
|
openCards: nestedCards ? nestedCards.currentOpenCards() : undefined,
|
|
122
122
|
...sortProps,
|
|
123
|
-
}), `${row.kind}-${row.id}`) }),
|
|
123
|
+
}), `${row.kind}-${row.id}`) }), `${row.kind}-${row.id}`));
|
|
124
124
|
}
|
|
125
125
|
// Split out the header rows from the data rows so that we can put an `infoMessage` in between them (if needed).
|
|
126
126
|
const headerRows = [];
|
|
@@ -256,11 +256,14 @@ function renderTable(style, id, columns, headerRows, filteredRows, firstRowMessa
|
|
|
256
256
|
* [3]: https://github.com/tannerlinsley/react-virtual/issues/108
|
|
257
257
|
*/
|
|
258
258
|
function renderVirtual(style, id, columns, headerRows, filteredRows, firstRowMessage, stickyHeader, firstLastColumnWidth, xss, virtuosoRef) {
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
const { footerStyle, listStyle } = (0, react_1.useMemo)(() => {
|
|
260
|
+
var _a;
|
|
261
|
+
const { paddingBottom, ...otherRootStyles } = (_a = style.rootCss) !== null && _a !== void 0 ? _a : {};
|
|
262
|
+
return { footerStyle: { paddingBottom }, listStyle: { ...style, rootCss: otherRootStyles } };
|
|
263
|
+
}, [style]);
|
|
261
264
|
return ((0, jsx_runtime_1.jsx)(react_virtuoso_1.Virtuoso, { ref: virtuosoRef, components: {
|
|
262
|
-
List: VirtualRoot(
|
|
263
|
-
Footer: () => (0, jsx_runtime_1.jsx)("div", { css:
|
|
265
|
+
List: VirtualRoot(listStyle, columns, id, firstLastColumnWidth, xss),
|
|
266
|
+
Footer: () => (0, jsx_runtime_1.jsx)("div", { css: footerStyle }, void 0),
|
|
264
267
|
},
|
|
265
268
|
// Pin/sticky both the header row(s) + firstRowMessage to the top
|
|
266
269
|
topItemCount: (stickyHeader ? headerRows.length : 0) + (firstRowMessage ? 1 : 0), itemSize: (el) => {
|
|
@@ -297,7 +300,7 @@ function renderVirtual(style, id, columns, headerRows, filteredRows, firstRowMes
|
|
|
297
300
|
* (solely to capture as params that we can't pass through react-virtuoso's API as props).
|
|
298
301
|
*/
|
|
299
302
|
const VirtualRoot = (0, memoize_one_1.default)((gs, columns, id, firstLastColumnWidth, xss) => {
|
|
300
|
-
return react_1.default.forwardRef(({ style, children }, ref)
|
|
303
|
+
return react_1.default.forwardRef(function VirtualRoot({ style, children }, ref) {
|
|
301
304
|
// This re-renders each time we have new children in the view port
|
|
302
305
|
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: ref, style: style, css: {
|
|
303
306
|
...Css_1.Css.dg.gtc(calcVirtualGridColumns(columns, firstLastColumnWidth)).$,
|