@ostack.tech/ui 0.12.0 → 0.12.1
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/ostack-ui.js +7 -5
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +1 -1
package/dist/ostack-ui.js
CHANGED
|
@@ -1049,7 +1049,7 @@ function numberOfRows$1(columns) {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
function numberOfColumns(columns) {
|
|
1051
1051
|
return columns.reduce(
|
|
1052
|
-
(n, column) => n + (column.subColumns.length === 0 ? 1 : numberOfColumns(column.subColumns)),
|
|
1052
|
+
(n, column) => n + (column.subColumns.length === 0 ? column.colSpan ?? 1 : numberOfColumns(column.subColumns)),
|
|
1053
1053
|
0
|
|
1054
1054
|
);
|
|
1055
1055
|
}
|
|
@@ -4245,7 +4245,7 @@ const TableCell = forwardRef(
|
|
|
4245
4245
|
{ fireImmediately: true }
|
|
4246
4246
|
);
|
|
4247
4247
|
}
|
|
4248
|
-
}, [_stickyColumnIndex, colSpan,
|
|
4248
|
+
}, [_stickyColumnIndex, colSpan, sticky, store]);
|
|
4249
4249
|
useEffect(() => {
|
|
4250
4250
|
if (_stickyColumnIndex != null && sticky) {
|
|
4251
4251
|
return store.subscribe(
|
|
@@ -4449,16 +4449,18 @@ const TableRow = forwardRef(
|
|
|
4449
4449
|
return child;
|
|
4450
4450
|
}
|
|
4451
4451
|
const tableCellProps = child.props;
|
|
4452
|
-
const { columnIndex, colSpan
|
|
4452
|
+
const { columnIndex, colSpan } = tableCellProps;
|
|
4453
4453
|
if (columnIndex !== void 0) {
|
|
4454
|
-
|
|
4454
|
+
if (columnIndex !== null) {
|
|
4455
|
+
nextIdx = columnIndex + (colSpan ?? 1);
|
|
4456
|
+
}
|
|
4455
4457
|
return child;
|
|
4456
4458
|
}
|
|
4457
4459
|
const cellIdx = nextIdx;
|
|
4458
4460
|
nextIdx += colSpan ?? 1;
|
|
4459
4461
|
return cloneElement(
|
|
4460
4462
|
child,
|
|
4461
|
-
{ columnIndex: cellIdx
|
|
4463
|
+
{ ...tableCellProps, columnIndex: cellIdx }
|
|
4462
4464
|
);
|
|
4463
4465
|
});
|
|
4464
4466
|
return /* @__PURE__ */ jsx(
|