Skip to content

Commit

Permalink
Fixes attribute menu position on scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
eireland committed Mar 26, 2024
1 parent b478133 commit febd498
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/draggable-table-tags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const DraggagleTableHeader: React.FC<DraggagleTableHeaderProps> = ({colle
handleSortAttribute(dataSetName, attribute.id, isDescending);
setShowHeaderMenu(false);
};

console.log("****** headerPos", headerPos, scrollY);

Check warning on line 83 in src/components/draggable-table-tags.tsx

View workflow job for this annotation

GitHub Actions / Build and Run Jest Tests

Unexpected console statement

Check warning on line 83 in src/components/draggable-table-tags.tsx

View workflow job for this annotation

GitHub Actions / S3 Deploy

Unexpected console statement
return (
<>
<th
Expand Down Expand Up @@ -108,7 +108,7 @@ export const DraggagleTableHeader: React.FC<DraggagleTableHeaderProps> = ({colle
{ showHeaderMenu && tableContainer && headerPos &&
createPortal(
<div className={css.headerMenu} ref={headerMenuRef}
style={{left: headerPos?.left + 5, top: headerPos?.bottom}}>
style={{left: headerPos?.left + 5, top: headerPos?.bottom + scrollY}}>
<select className={css.headerMenuSelect} size={2} onChange={handleSortAttr}>
<option value="asc">Sort Ascending (A➞Z, 0➞9)</option>
<option value="desc">Sort Descending (Z➞A, 9➞0)</option>
Expand Down

0 comments on commit febd498

Please sign in to comment.