@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.js
CHANGED
|
@@ -6280,26 +6280,15 @@ var styles$19 = {"data-table-scroll-fake-border":"_wZ8Xg","data-table-scroll-fak
|
|
|
6280
6280
|
var DataTableScrollFakeBorder = function DataTableScrollFakeBorder(_ref) {
|
|
6281
6281
|
var _classNames, _classNames2, _classNames3;
|
|
6282
6282
|
var placement = _ref.placement,
|
|
6283
|
-
|
|
6284
|
-
var
|
|
6285
|
-
headerheight = _React$useState[0],
|
|
6286
|
-
setHeaderHeight = _React$useState[1];
|
|
6287
|
-
React.useLayoutEffect(function () {
|
|
6288
|
-
if (!tableRef.current) {
|
|
6289
|
-
console.log('ref not available');
|
|
6290
|
-
return;
|
|
6291
|
-
}
|
|
6292
|
-
var header = tableRef.current.getElementsByTagName('thead')[0];
|
|
6293
|
-
console.log('header height', header.clientHeight);
|
|
6294
|
-
setHeaderHeight(header.clientHeight);
|
|
6295
|
-
}, [setHeaderHeight, tableRef]);
|
|
6283
|
+
hasSort = _ref.hasSort;
|
|
6284
|
+
var topHeaderheight = hasSort ? 29 : 24;
|
|
6296
6285
|
var backgroundColor = useBackgroundColor();
|
|
6297
6286
|
return React__default["default"].createElement("div", {
|
|
6298
6287
|
className: classnames__default["default"](styles$19['data-table-scroll-fake-border'], (_classNames = {}, _classNames[styles$19['data-table-scroll-fake-border--top']] = placement === 'top', _classNames[styles$19['data-table-scroll-fake-border--bottom']] = placement === 'bottom', _classNames)),
|
|
6299
6288
|
style: {
|
|
6300
6289
|
// @ts-expect-error This difines a custom CSS variable
|
|
6301
6290
|
'--corner-background-color': backgroundColor,
|
|
6302
|
-
top: placement === 'top' ?
|
|
6291
|
+
top: placement === 'top' ? topHeaderheight : undefined
|
|
6303
6292
|
}
|
|
6304
6293
|
}, React__default["default"].createElement("div", {
|
|
6305
6294
|
className: classnames__default["default"](styles$19['data-table-scroll-fake-border__left'], (_classNames2 = {}, _classNames2[styles$19['data-table-scroll-fake-border__left--top']] = placement === 'top', _classNames2[styles$19['data-table-scroll-fake-border__left--bottom']] = placement === 'bottom', _classNames2))
|
|
@@ -9333,7 +9322,7 @@ var DataTable = function DataTable(_ref) {
|
|
|
9333
9322
|
tableRef: tableRef
|
|
9334
9323
|
}, isShowingColumns && isScrollableTable && React__default["default"].createElement(DataTableScrollFakeBorder, {
|
|
9335
9324
|
placement: "top",
|
|
9336
|
-
|
|
9325
|
+
hasSort: !!onSort
|
|
9337
9326
|
}), React__default["default"].createElement("div", {
|
|
9338
9327
|
className: classnames__default["default"](styles$1a['data-table__content'], (_classNames = {}, _classNames[styles$1a['data-table__content--with-scroll']] = isScrollableTable, _classNames)),
|
|
9339
9328
|
style: conditionalStyles
|
|
@@ -9368,8 +9357,7 @@ var DataTable = function DataTable(_ref) {
|
|
|
9368
9357
|
className: styles$1a['data-table__footer'],
|
|
9369
9358
|
"data-testid": testId && testId + "-footer"
|
|
9370
9359
|
}, footerComponent)))), !isShowingFooter && isScrollableTable && React__default["default"].createElement(DataTableScrollFakeBorder, {
|
|
9371
|
-
placement: "bottom"
|
|
9372
|
-
tableRef: tableRef
|
|
9360
|
+
placement: "bottom"
|
|
9373
9361
|
})), React__default["default"].createElement(Pagination, null));
|
|
9374
9362
|
};
|
|
9375
9363
|
|