@7shifts/sous-chef 3.57.3-beta2 → 3.57.3-beta3
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,17 @@ var styles$19 = {"data-table-scroll-fake-border":"_wZ8Xg","data-table-scroll-fak
|
|
|
6400
6400
|
*/
|
|
6401
6401
|
const DataTableScrollFakeBorder = ({
|
|
6402
6402
|
placement,
|
|
6403
|
-
tableRef
|
|
6403
|
+
tableRef,
|
|
6404
|
+
hasSort
|
|
6404
6405
|
}) => {
|
|
6405
|
-
const [
|
|
6406
|
+
const [topHeaderheight, setTopHeaderHeight] = React__default.useState(hasSort ? 29 : 24);
|
|
6406
6407
|
useLayoutEffect(() => {
|
|
6407
6408
|
if (!tableRef.current) {
|
|
6408
|
-
console.log('ref not available');
|
|
6409
6409
|
return;
|
|
6410
6410
|
}
|
|
6411
6411
|
const header = tableRef.current.getElementsByTagName('thead')[0];
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
}, [setHeaderHeight, tableRef]);
|
|
6412
|
+
setTopHeaderHeight(header.clientHeight);
|
|
6413
|
+
}, [tableRef]);
|
|
6415
6414
|
const backgroundColor = useBackgroundColor();
|
|
6416
6415
|
return React__default.createElement("div", {
|
|
6417
6416
|
className: classnames(styles$19['data-table-scroll-fake-border'], {
|
|
@@ -6421,7 +6420,7 @@ const DataTableScrollFakeBorder = ({
|
|
|
6421
6420
|
style: {
|
|
6422
6421
|
// @ts-expect-error This difines a custom CSS variable
|
|
6423
6422
|
'--corner-background-color': backgroundColor,
|
|
6424
|
-
top: placement === 'top' ?
|
|
6423
|
+
top: placement === 'top' ? topHeaderheight : undefined
|
|
6425
6424
|
}
|
|
6426
6425
|
}, React__default.createElement("div", {
|
|
6427
6426
|
className: classnames(styles$19['data-table-scroll-fake-border__left'], {
|
|
@@ -9506,6 +9505,7 @@ const DataTable = _ref => {
|
|
|
9506
9505
|
tableRef: tableRef
|
|
9507
9506
|
}, isShowingColumns && isScrollableTable && React__default.createElement(DataTableScrollFakeBorder, {
|
|
9508
9507
|
placement: "top",
|
|
9508
|
+
hasSort: !!onSort,
|
|
9509
9509
|
tableRef: tableRef
|
|
9510
9510
|
}), React__default.createElement("div", {
|
|
9511
9511
|
className: classnames(styles$1a['data-table__content'], {
|