@symply.io/basic-components 1.6.11-alpha.3 → 1.6.11-alpha.4
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/DataTable/TableBody.js +7 -1
- package/DataTable/index.js +1 -2
- package/package.json +1 -1
package/DataTable/TableBody.js
CHANGED
@@ -27,7 +27,13 @@ import TableCell from "@mui/material/TableCell";
|
|
27
27
|
import TableBodyRow from "./TableBodyRow";
|
28
28
|
function TBody(props) {
|
29
29
|
var rows = props.rows, columns = props.columns, virtualRows = props.virtualRows, _a = props.noDataText, noDataText = _a === void 0 ? "No Data!" : _a, rest = __rest(props, ["rows", "columns", "virtualRows", "noDataText"]);
|
30
|
-
return (_jsx(TableBody, { children: virtualRows.length > 0 ? (virtualRows.map(function (virtualRow) {
|
30
|
+
return (_jsx(TableBody, { children: virtualRows.length > 0 ? (virtualRows.map(function (virtualRow, index) {
|
31
|
+
console.log({
|
32
|
+
virtualRow: virtualRow,
|
33
|
+
index: index,
|
34
|
+
row1: rows[virtualRow.index],
|
35
|
+
row2: rows[index],
|
36
|
+
});
|
31
37
|
return (_jsx(TableBodyRow, __assign({ rowIndex: virtualRow.index, virtualRow: virtualRow, rows: rows, columns: columns }, rest), "DataTable_".concat(virtualRow.key || virtualRow.index)));
|
32
38
|
})) : (_jsx(TableRow, { children: _jsx(TableCell, __assign({ colSpan: columns.length, align: "center" }, { children: noDataText })) })) }));
|
33
39
|
}
|
package/DataTable/index.js
CHANGED
@@ -11,7 +11,6 @@ var __assign = (this && this.__assign) || function () {
|
|
11
11
|
};
|
12
12
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
13
13
|
import { useState, useCallback, useRef, useEffect } from "react";
|
14
|
-
import Grid from "@mui/material/Grid";
|
15
14
|
import Table from "@mui/material/Table";
|
16
15
|
import TableContainer from "@mui/material/TableContainer";
|
17
16
|
import ThemeProvider from "@mui/material/styles/ThemeProvider";
|
@@ -68,7 +67,7 @@ function DataTable(props) {
|
|
68
67
|
borderRadius: "4px",
|
69
68
|
borderCollapse: "unset !important",
|
70
69
|
transition: "all 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
71
|
-
} }, { children:
|
70
|
+
} }, { children: _jsxs(Table, __assign({ sx: { minWidth: 600, tableLayout: "fixed" }, size: dense ? "small" : "medium" }, { children: [_jsx(TableHeader, { headers: headers, headerBgColor: headerBgColor, headerTextColor: headerTextColor, noData: rows.length === 0, leftShadowVisible: leftShadowVisible, rightShadowVisible: rightShadowVisible }), _jsx(TableBody, { rows: rows, virtualRows: virtualRows, columns: columns, noDataText: noDataText, onRowClick: onRowClick, onContextMenu: onContextMenu, onCustomizeRowBgColor: onCustomizeRowBgColor, leftShadowVisible: leftShadowVisible, rightShadowVisible: rightShadowVisible }), (footers === null || footers === void 0 ? void 0 : footers.length) > 0 ? (_jsx(TableFooter, { footers: footers, footerBgColor: footerBgColor, footerTextColor: footerTextColor, noData: rows.length === 0, leftShadowVisible: leftShadowVisible, rightShadowVisible: rightShadowVisible })) : (_jsx(_Fragment, {}))] })) })) })));
|
72
71
|
}
|
73
72
|
export default DataTable;
|
74
73
|
export * from "./types";
|