Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion site/src/pages/UsersPage/UsersTable/UserGroupsCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
PopoverTrigger,
PopoverContent,
} from "components/Popover/Popover";
import { css } from "@emotion/css";

type GroupsCellProps = {
userGroups: readonly Group[] | undefined;
Expand Down Expand Up @@ -68,7 +69,23 @@ export function UserGroupsCell({ userGroups }: GroupsCellProps) {
</Button>
</PopoverTrigger>

<PopoverContent disableScrollLock disableRestoreFocus>
<PopoverContent
disableScrollLock
disableRestoreFocus
css={(theme) => ({
".MuiPaper-root": {
minWidth: "auto",
},
})}
anchorOrigin={{
vertical: "top",
horizontal: "center",
}}
transformOrigin={{
vertical: "bottom",
horizontal: "center",
}}
>
<OverflowY maxHeight={400}>
<List
component="ul"
Expand Down
9 changes: 9 additions & 0 deletions site/src/pages/UsersPage/UsersTable/UserRoleCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,17 @@ function OverflowRolePill({ roles }: OverflowRolePillProps) {
rowGap: theme.spacing(1.5),
padding: theme.spacing(1.5, 2),
alignContent: "space-around",
minWidth: "auto",
},
}}
anchorOrigin={{
vertical: -4,
horizontal: "center",
}}
transformOrigin={{
vertical: "bottom",
horizontal: "center",
}}
>
{roles.map((role) => (
<Pill
Expand Down