Skip to content

Commit baed0c1

Browse files
authored
Merge pull request #269 from malinskibeniamin/fix-menu-context-option-issue
2 parents a1dad5b + 852b139 commit baed0c1

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/chakra-components/menu.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22
import type { IconProps } from "@chakra-ui/icon";
33
import Icon from "@chakra-ui/icon";
44
import { Box } from "@chakra-ui/layout";
5-
import { MenuIcon } from "@chakra-ui/menu";
5+
import { Menu as ChakraMenu, MenuIcon } from "@chakra-ui/menu";
66
import type { SystemStyleObject } from "@chakra-ui/system";
77
import { useColorModeValue, useMultiStyleConfig } from "@chakra-ui/system";
88
import type {
@@ -49,14 +49,16 @@ const Menu = <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(
4949
: initialSx;
5050

5151
return (
52-
<Box
53-
{...innerProps}
54-
ref={innerRef}
55-
className={cx({ menu: true }, className)}
56-
sx={sx}
57-
>
58-
{children}
59-
</Box>
52+
<ChakraMenu>
53+
<Box
54+
{...innerProps}
55+
ref={innerRef}
56+
className={cx({ menu: true }, className)}
57+
sx={sx}
58+
>
59+
{children}
60+
</Box>
61+
</ChakraMenu>
6062
);
6163
};
6264

0 commit comments

Comments
 (0)