@7shifts/sous-chef 3.57.3-beta1 → 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,24 +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
6290
|
return;
|
|
6290
6291
|
}
|
|
6291
6292
|
var header = tableRef.current.getElementsByTagName('thead')[0];
|
|
6292
|
-
|
|
6293
|
-
}, [
|
|
6293
|
+
setTopHeaderHeight(header.clientHeight);
|
|
6294
|
+
}, [tableRef]);
|
|
6294
6295
|
var backgroundColor = useBackgroundColor();
|
|
6295
6296
|
return React__default["default"].createElement("div", {
|
|
6296
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)),
|
|
6297
6298
|
style: {
|
|
6298
6299
|
// @ts-expect-error This difines a custom CSS variable
|
|
6299
6300
|
'--corner-background-color': backgroundColor,
|
|
6300
|
-
top: placement === 'top' ?
|
|
6301
|
+
top: placement === 'top' ? topHeaderheight : undefined
|
|
6301
6302
|
}
|
|
6302
6303
|
}, React__default["default"].createElement("div", {
|
|
6303
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))
|
|
@@ -9331,6 +9332,7 @@ var DataTable = function DataTable(_ref) {
|
|
|
9331
9332
|
tableRef: tableRef
|
|
9332
9333
|
}, isShowingColumns && isScrollableTable && React__default["default"].createElement(DataTableScrollFakeBorder, {
|
|
9333
9334
|
placement: "top",
|
|
9335
|
+
hasSort: !!onSort,
|
|
9334
9336
|
tableRef: tableRef
|
|
9335
9337
|
}), React__default["default"].createElement("div", {
|
|
9336
9338
|
className: classnames__default["default"](styles$1a['data-table__content'], (_classNames = {}, _classNames[styles$1a['data-table__content--with-scroll']] = isScrollableTable, _classNames)),
|