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