@oliasoft-open-source/react-ui-library 4.16.2-beta-4 → 4.16.2-beta-5
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 +13 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -52135,7 +52135,7 @@ const TableScrollWrapper = ({
|
|
|
52135
52135
|
children
|
|
52136
52136
|
}) => {
|
|
52137
52137
|
var _a2, _b;
|
|
52138
|
-
if (!table2.infiniteScroll
|
|
52138
|
+
if (!table2.infiniteScroll) {
|
|
52139
52139
|
return /* @__PURE__ */ jsx("div", { id: "scrollWrapper", className: styles$b.scroll, children: /* @__PURE__ */ jsx("div", { className: styles$b.virtualRows, children: children({}) }) });
|
|
52140
52140
|
}
|
|
52141
52141
|
const containerRef = useRef(null);
|
|
@@ -52148,7 +52148,14 @@ const TableScrollWrapper = ({
|
|
|
52148
52148
|
});
|
|
52149
52149
|
const theadHeight = ((_b = theadRef.current) == null ? void 0 : _b.clientHeight) ?? 0;
|
|
52150
52150
|
const totalHeight = virtualizer.getTotalSize() + theadHeight;
|
|
52151
|
-
|
|
52151
|
+
const items = virtualizer.getVirtualItems();
|
|
52152
|
+
const paddingTop = items.length > 0 ? items[0].start : 0;
|
|
52153
|
+
const paddingBottom = items.length > 0 ? virtualizer.getTotalSize() - items[items.length - 1].end : 0;
|
|
52154
|
+
const tableStyle = {
|
|
52155
|
+
"--virtualPaddingTop": paddingTop + "px",
|
|
52156
|
+
"--virtualPaddingBottom": paddingBottom + "px"
|
|
52157
|
+
};
|
|
52158
|
+
return /* @__PURE__ */ jsx("div", { id: "scrollWrapper", className: styles$b.scroll, ref: containerRef, children: /* @__PURE__ */ jsx("div", { className: styles$b.virtualRows, style: { height: totalHeight }, children: children({ virtualizer, tableStyle }) }) });
|
|
52152
52159
|
};
|
|
52153
52160
|
const Table = (props) => {
|
|
52154
52161
|
var _a2, _b, _c, _d, _e2, _f, _g;
|
|
@@ -52245,23 +52252,13 @@ const Table = (props) => {
|
|
|
52245
52252
|
rowActions,
|
|
52246
52253
|
rows,
|
|
52247
52254
|
tbodyRef,
|
|
52248
|
-
children: /* @__PURE__ */ jsx(TableScrollWrapper, { table: table2, theadRef, children: ({ virtualizer }) => {
|
|
52249
|
-
let style = {};
|
|
52250
|
-
if (virtualizer) {
|
|
52251
|
-
const items = virtualizer.getVirtualItems();
|
|
52252
|
-
const paddingTop = items.length > 0 ? items[0].start : 0;
|
|
52253
|
-
const paddingBottom = items.length > 0 ? virtualizer.getTotalSize() - items[items.length - 1].end : 0;
|
|
52254
|
-
style = {
|
|
52255
|
-
"--virtualPaddingTop": paddingTop + "px",
|
|
52256
|
-
"--virtualPaddingBottom": paddingBottom + "px"
|
|
52257
|
-
};
|
|
52258
|
-
}
|
|
52255
|
+
children: /* @__PURE__ */ jsx(TableScrollWrapper, { table: table2, theadRef, children: ({ virtualizer, tableStyle }) => {
|
|
52259
52256
|
return /* @__PURE__ */ jsxs(
|
|
52260
52257
|
"table",
|
|
52261
52258
|
{
|
|
52262
52259
|
className: cx$2(styles$b.table, striped2 ? styles$b.striped : ""),
|
|
52263
52260
|
"data-testid": testId,
|
|
52264
|
-
style,
|
|
52261
|
+
style: tableStyle,
|
|
52265
52262
|
children: [
|
|
52266
52263
|
/* @__PURE__ */ jsx("thead", { ref: theadRef, children: headers.map((row2, rowIndex) => {
|
|
52267
52264
|
return /* @__PURE__ */ jsx(
|
|
@@ -52281,7 +52278,7 @@ const Table = (props) => {
|
|
|
52281
52278
|
`0_${rowIndex}`
|
|
52282
52279
|
);
|
|
52283
52280
|
}) }),
|
|
52284
|
-
/* @__PURE__ */ jsx("tbody", { ref: tbodyRef, children: virtualizer ? virtualizer.getVirtualItems().map((virtualRow2
|
|
52281
|
+
/* @__PURE__ */ jsx("tbody", { ref: tbodyRef, children: virtualizer ? virtualizer.getVirtualItems().map((virtualRow2) => /* @__PURE__ */ jsx(
|
|
52285
52282
|
Row,
|
|
52286
52283
|
{
|
|
52287
52284
|
rowIndex: virtualRow2.index,
|
|
@@ -52293,7 +52290,7 @@ const Table = (props) => {
|
|
|
52293
52290
|
columnAlignment,
|
|
52294
52291
|
draggableTable: draggable
|
|
52295
52292
|
},
|
|
52296
|
-
`1_${
|
|
52293
|
+
`1_${virtualRow2.index}`
|
|
52297
52294
|
)) : rows.map((row2, index2) => /* @__PURE__ */ jsx(
|
|
52298
52295
|
Row,
|
|
52299
52296
|
{
|