We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2362ff commit a29718fCopy full SHA for a29718f
packages/react/src/BlockSideMenu/components/DragHandleMenuItem.tsx
@@ -5,13 +5,14 @@ export type DragHandleMenuItemProps = PolymorphicComponentProps<"button"> & {
5
closeMenu: () => void;
6
};
7
8
-export const DragHandleMenuItem = (props: DragHandleMenuItemProps) => (
9
- <Menu.Item
10
- {...props}
+export const DragHandleMenuItem = (props: DragHandleMenuItemProps) => {
+ const {closeMenu, onClick, ...propsToPassThrough} = props;
+ return <Menu.Item
11
+ {...propsToPassThrough}
12
onClick={(event) => {
- props.closeMenu();
13
- props.onClick?.(event);
+ closeMenu();
14
+ onClick?.(event);
15
}}>
16
{props.children}
- </Menu.Item>
17
-);
+ </Menu.Item>;
18
+};
0 commit comments