Skip to content

Commit

Permalink
chore: use portal by default in avatar menu
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverchanyw committed Oct 3, 2024
1 parent b95107b commit 145bfda
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions react/src/AvatarMenu/AvatarMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
MenuDivider,
MenuListProps,
MenuProps,
Portal,
useMultiStyleConfig,
} from '@chakra-ui/react'
import { merge } from 'lodash'
Expand Down Expand Up @@ -78,9 +79,11 @@ export const AvatarMenu = ({
{hasNotification && badge}
</Avatar>
</AvatarMenuButton>
<Menu.List role="menu" sx={styles.list} {...menuListProps}>
{children}
</Menu.List>
<Portal>
<Menu.List role="menu" sx={styles.list} {...menuListProps}>
{children}
</Menu.List>
</Portal>
</>
)}
</Menu>
Expand Down

0 comments on commit 145bfda

Please sign in to comment.