Skip to content

Commit 3b36858

Browse files
committed
docs: add comments explaining some pitfalls with Popover component
1 parent c46b42a commit 3b36858

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

site/src/pages/UsersPage/UsersTable/UserGroupsCell.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,17 @@ export function UserGroupsCell({ userGroups }: GroupsCellProps) {
7979
</Button>
8080

8181
<Popover
82-
disableScrollLock
8382
id={popoverId}
8483
anchorEl={anchorEl}
8584
open={anchorEl !== null}
8685
onClose={closePopover}
8786
anchorOrigin={{ vertical: "bottom", horizontal: "left" }}
87+
// These are necessary to ensure that the popover doesn't exhibit
88+
// weird, janky behavior when scrolling
89+
disablePortal
90+
disableScrollLock
91+
// Makes sure that the table cell and the popover don't fight each
92+
// other over deciding whether the popover should be open or closed
8893
css={{ pointerEvents: "none" }}
8994
>
9095
<OverflowY maxHeight={400} sx={{ maxWidth: "320px" }}>

0 commit comments

Comments
 (0)