@pdg/react-table 1.0.74 → 1.0.75
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.esm.js +11 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3437,17 +3437,21 @@ var TableTopHead = function (_a) {
|
|
|
3437
3437
|
React__default.createElement(TableCell, { colSpan: columns.length }, caption)));
|
|
3438
3438
|
}, [caption, columns]);
|
|
3439
3439
|
var makeRowCells = useCallback(function (row, top) {
|
|
3440
|
+
var totalColumns = 0;
|
|
3440
3441
|
var cells = row
|
|
3441
3442
|
.map(function (info, idx) {
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3443
|
+
if (info) {
|
|
3444
|
+
totalColumns += info.colSpan || 1;
|
|
3445
|
+
return (React__default.createElement(TableCell, { key: idx, colSpan: info.colSpan, align: info.align, style: {
|
|
3446
|
+
top: top,
|
|
3447
|
+
borderBottom: 0,
|
|
3448
|
+
} },
|
|
3449
|
+
info.label,
|
|
3450
|
+
info.label != null && React__default.createElement(BottomLine, { style: { backgroundColor: theme.palette.divider } })));
|
|
3451
|
+
}
|
|
3448
3452
|
})
|
|
3449
3453
|
.filter(function (cell) { return !!cell; });
|
|
3450
|
-
if (
|
|
3454
|
+
if (totalColumns < columns.length) {
|
|
3451
3455
|
cells.push(React__default.createElement(TableCell, { key: columns.length, colSpan: columns.length - cells.length, style: { top: top, borderBottom: 0 } }));
|
|
3452
3456
|
}
|
|
3453
3457
|
return cells;
|