Skip to content

Commit

Permalink
Merge pull request #37 from concord-consortium/188114776-fix-dragging…
Browse files Browse the repository at this point in the history
…-bug

Fix dropdown icon issue that was causing dragging bug. (PT-188114776)
  • Loading branch information
lublagg authored Aug 26, 2024
2 parents d7c3832 + d880570 commit e044fcb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/assets/dropdown-arrow-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 11 additions & 5 deletions src/components/draggable-table-tags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,17 @@ export const DraggagleTableHeader: React.FC<DraggagleTableHeaderProps> = ({colle
onMouseLeave={() => setShowDropdownIcon(false)}
onClick={handleShowHeaderMenu}
>
{children}
{showDropdownIcon &&
<DropdownIcon onClick={handleShowHeaderMenu}
style={{position: "absolute", right: 0, top: -2}}/>
}
<div className={css.thChildContainer}>
<div>{children}</div>
{showDropdownIcon &&
<div className={css.dropdownIcon}>
<DropdownIcon
onClick={handleShowHeaderMenu}
className={css.dropdownIcon}
/>
</div>
}
</div>
</th>
{ showHeaderMenu && tableContainer && headerPos &&
createPortal(
Expand Down
18 changes: 18 additions & 0 deletions src/components/tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,21 @@ table.draggableTableContainer {
padding: 5px;
}
}

.thChildContainer {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 15px;
width: 100%;
gap: 5px;
.dropdownIcon {
&:hover {
cursor: pointer;
}
svg {
width: 10px;
}
}
}

0 comments on commit e044fcb

Please sign in to comment.