Fix Broken user dropdown (#2138)

* Fix Broken user dropdown

* Add unnecessary removal

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
pull/2132/head^2
Hariom Balhara 2022-03-14 15:45:00 +05:30 committed by GitHub
parent 62be5b561e
commit 6377377c4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -418,7 +418,7 @@ function UserDropdown({ small }: { small?: boolean }) {
)}
</div>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuContent portalled={true}>
<DropdownMenuItem>
<a
onClick={() => {

View File

@ -25,11 +25,11 @@ export const DropdownMenuContent = forwardRef<HTMLDivElement, DropdownMenuConten
({ children, ...props }, forwardedRef) => {
return (
<DropdownMenuPrimitive.Content
portalled={false}
portalled={props.portalled}
{...props}
className={`${
props.portalled ? `` : `md:-ml-[55px]`
} z-10 mt-1 -ml-0 w-48 origin-top-right rounded-sm bg-white text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none lg:-ml-56`}
} z-10 mt-1 -ml-0 w-48 origin-top-right rounded-sm bg-white text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none`}
ref={forwardedRef}>
{children}
</DropdownMenuPrimitive.Content>