@7shifts/sous-chef 3.57.3-beta2 → 3.57.3-beta4
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.modern.js
CHANGED
|
@@ -6400,18 +6400,9 @@ var styles$19 = {"data-table-scroll-fake-border":"_wZ8Xg","data-table-scroll-fak
|
|
|
6400
6400
|
*/
|
|
6401
6401
|
const DataTableScrollFakeBorder = ({
|
|
6402
6402
|
placement,
|
|
6403
|
-
|
|
6403
|
+
hasSort
|
|
6404
6404
|
}) => {
|
|
6405
|
-
const
|
|
6406
|
-
useLayoutEffect(() => {
|
|
6407
|
-
if (!tableRef.current) {
|
|
6408
|
-
console.log('ref not available');
|
|
6409
|
-
return;
|
|
6410
|
-
}
|
|
6411
|
-
const header = tableRef.current.getElementsByTagName('thead')[0];
|
|
6412
|
-
console.log('header height', header.clientHeight);
|
|
6413
|
-
setHeaderHeight(header.clientHeight);
|
|
6414
|
-
}, [setHeaderHeight, tableRef]);
|
|
6405
|
+
const topHeaderheight = hasSort ? 29 : 24;
|
|
6415
6406
|
const backgroundColor = useBackgroundColor();
|
|
6416
6407
|
return React__default.createElement("div", {
|
|
6417
6408
|
className: classnames(styles$19['data-table-scroll-fake-border'], {
|
|
@@ -6421,7 +6412,7 @@ const DataTableScrollFakeBorder = ({
|
|
|
6421
6412
|
style: {
|
|
6422
6413
|
// @ts-expect-error This difines a custom CSS variable
|
|
6423
6414
|
'--corner-background-color': backgroundColor,
|
|
6424
|
-
top: placement === 'top' ?
|
|
6415
|
+
top: placement === 'top' ? topHeaderheight : undefined
|
|
6425
6416
|
}
|
|
6426
6417
|
}, React__default.createElement("div", {
|
|
6427
6418
|
className: classnames(styles$19['data-table-scroll-fake-border__left'], {
|
|
@@ -9506,7 +9497,7 @@ const DataTable = _ref => {
|
|
|
9506
9497
|
tableRef: tableRef
|
|
9507
9498
|
}, isShowingColumns && isScrollableTable && React__default.createElement(DataTableScrollFakeBorder, {
|
|
9508
9499
|
placement: "top",
|
|
9509
|
-
|
|
9500
|
+
hasSort: !!onSort
|
|
9510
9501
|
}), React__default.createElement("div", {
|
|
9511
9502
|
className: classnames(styles$1a['data-table__content'], {
|
|
9512
9503
|
[styles$1a['data-table__content--with-scroll']]: isScrollableTable
|
|
@@ -9545,8 +9536,7 @@ const DataTable = _ref => {
|
|
|
9545
9536
|
className: styles$1a['data-table__footer'],
|
|
9546
9537
|
"data-testid": testId && `${testId}-footer`
|
|
9547
9538
|
}, footerComponent)))), !isShowingFooter && isScrollableTable && React__default.createElement(DataTableScrollFakeBorder, {
|
|
9548
|
-
placement: "bottom"
|
|
9549
|
-
tableRef: tableRef
|
|
9539
|
+
placement: "bottom"
|
|
9550
9540
|
})), React__default.createElement(Pagination, null));
|
|
9551
9541
|
};
|
|
9552
9542
|
|