Skip to content

Commit

Permalink
Merge pull request #269 from malinskibeniamin/fix-menu-context-option…
Browse files Browse the repository at this point in the history
…-issue
  • Loading branch information
csandman committed Jul 24, 2023
2 parents a1dad5b + 852b139 commit baed0c1
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/chakra-components/menu.tsx
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import type { IconProps } from "@chakra-ui/icon";
import Icon from "@chakra-ui/icon";
import { Box } from "@chakra-ui/layout";
import { MenuIcon } from "@chakra-ui/menu";
import { Menu as ChakraMenu, MenuIcon } from "@chakra-ui/menu";
import type { SystemStyleObject } from "@chakra-ui/system";
import { useColorModeValue, useMultiStyleConfig } from "@chakra-ui/system";
import type {
Expand Down Expand Up @@ -49,14 +49,16 @@ const Menu = <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(
: initialSx;

return (
<Box
{...innerProps}
ref={innerRef}
className={cx({ menu: true }, className)}
sx={sx}
>
{children}
</Box>
<ChakraMenu>
<Box
{...innerProps}
ref={innerRef}
className={cx({ menu: true }, className)}
sx={sx}
>
{children}
</Box>
</ChakraMenu>
);
};

Expand Down

0 comments on commit baed0c1

Please sign in to comment.