@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.js
CHANGED
|
@@ -6280,26 +6280,25 @@ 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
|
-
tableRef = _ref.tableRef
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6283
|
+
tableRef = _ref.tableRef,
|
|
6284
|
+
hasSort = _ref.hasSort;
|
|
6285
|
+
var _React$useState = React__default["default"].useState(hasSort ? 29 : 24),
|
|
6286
|
+
topHeaderheight = _React$useState[0],
|
|
6287
|
+
setTopHeaderHeight = _React$useState[1];
|
|
6287
6288
|
React.useLayoutEffect(function () {
|
|
6288
6289
|
if (!tableRef.current) {
|
|
6289
|
-
console.log('ref not available');
|
|
6290
6290
|
return;
|
|
6291
6291
|
}
|
|
6292
6292
|
var header = tableRef.current.getElementsByTagName('thead')[0];
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
}, [setHeaderHeight, tableRef]);
|
|
6293
|
+
setTopHeaderHeight(header.clientHeight);
|
|
6294
|
+
}, [tableRef]);
|
|
6296
6295
|
var backgroundColor = useBackgroundColor();
|
|
6297
6296
|
return React__default["default"].createElement("div", {
|
|
6298
6297
|
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
6298
|
style: {
|
|
6300
6299
|
// @ts-expect-error This difines a custom CSS variable
|
|
6301
6300
|
'--corner-background-color': backgroundColor,
|
|
6302
|
-
top: placement === 'top' ?
|
|
6301
|
+
top: placement === 'top' ? topHeaderheight : undefined
|
|
6303
6302
|
}
|
|
6304
6303
|
}, React__default["default"].createElement("div", {
|
|
6305
6304
|
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,6 +9332,7 @@ var DataTable = function DataTable(_ref) {
|
|
|
9333
9332
|
tableRef: tableRef
|
|
9334
9333
|
}, isShowingColumns && isScrollableTable && React__default["default"].createElement(DataTableScrollFakeBorder, {
|
|
9335
9334
|
placement: "top",
|
|
9335
|
+
hasSort: !!onSort,
|
|
9336
9336
|
tableRef: tableRef
|
|
9337
9337
|
}), React__default["default"].createElement("div", {
|
|
9338
9338
|
className: classnames__default["default"](styles$1a['data-table__content'], (_classNames = {}, _classNames[styles$1a['data-table__content--with-scroll']] = isScrollableTable, _classNames)),
|