react-better-html 1.1.105 → 1.1.107
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 +5 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6893,7 +6893,7 @@ var TableStyledComponent = import_styled_components11.default.table.withConfig({
|
|
|
6893
6893
|
${(props) => props.withHover ? import_styled_components11.css`
|
|
6894
6894
|
transition: ${props.theme.styles.transition};
|
|
6895
6895
|
|
|
6896
|
-
&:not(.isHeader):hover {
|
|
6896
|
+
&:not(.isHeader):not(.isFooter):not(.withoutHover):hover {
|
|
6897
6897
|
filter: brightness(${props.colorTheme === "light" ? "0.95" : "0.85"});
|
|
6898
6898
|
}
|
|
6899
6899
|
` : ""}
|
|
@@ -7188,10 +7188,11 @@ var TableComponent = (0, import_react23.forwardRef)(function Table({
|
|
|
7188
7188
|
);
|
|
7189
7189
|
const dataAfterPagination = (0, import_react23.useMemo)(() => {
|
|
7190
7190
|
if (pageSize === void 0) return dataAfterFilter;
|
|
7191
|
+
if (pageCount !== void 0) return dataAfterFilter;
|
|
7191
7192
|
const pageStartItemIndex = (currentPage - 1) * (pageSize ?? 0);
|
|
7192
7193
|
const pageEndItemIndex = pageStartItemIndex + (pageSize ?? 0);
|
|
7193
7194
|
return dataAfterFilter.slice(pageStartItemIndex, pageEndItemIndex);
|
|
7194
|
-
}, [dataAfterFilter, pageSize, currentPage]);
|
|
7195
|
+
}, [dataAfterFilter, pageSize, currentPage, pageCount]);
|
|
7195
7196
|
const everythingIsChecked = (0, import_react23.useMemo)(() => {
|
|
7196
7197
|
return checkedItems.every((checked) => checked) && checkedItems.length === data.length;
|
|
7197
7198
|
}, [data, checkedItems]);
|
|
@@ -7319,7 +7320,7 @@ var TableComponent = (0, import_react23.forwardRef)(function Table({
|
|
|
7319
7320
|
},
|
|
7320
7321
|
column.type + column.label + index
|
|
7321
7322
|
)) }) }),
|
|
7322
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tbody", { children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "noData", colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Loader_default.box, {}) }) }) : dataAfterPagination.length > 0 ? dataAfterPagination.map((item, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
7323
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tbody", { children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tr", { className: "withoutHover", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "noData", colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Loader_default.box, {}) }) }) : dataAfterPagination.length > 0 ? dataAfterPagination.map((item, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
7323
7324
|
"tr",
|
|
7324
7325
|
{
|
|
7325
7326
|
className: onClickRow ? "isClickable" : void 0,
|
|
@@ -7327,7 +7328,7 @@ var TableComponent = (0, import_react23.forwardRef)(function Table({
|
|
|
7327
7328
|
children: columns.map((column, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TdStyledComponent, { textAlign: column.align, children: renderCellContent(column, item, rowIndex) }, column.type + column.label + colIndex))
|
|
7328
7329
|
},
|
|
7329
7330
|
JSON.stringify(item) + rowIndex
|
|
7330
|
-
)) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "noData", colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default.unknown, { children: noDataItemsMessage }) }) }) }),
|
|
7331
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tr", { className: "withoutHover", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: "noData", colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text_default.unknown, { children: noDataItemsMessage }) }) }) }),
|
|
7331
7332
|
pageSize !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tfoot", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tr", { className: "isFooter", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
7332
7333
|
Div_default.column,
|
|
7333
7334
|
{
|