diff --git a/packages/semi-ui/dropdown/__test__/dropdown.test.js b/packages/semi-ui/dropdown/__test__/dropdown.test.js
index e673431831..2bdeebbef5 100644
--- a/packages/semi-ui/dropdown/__test__/dropdown.test.js
+++ b/packages/semi-ui/dropdown/__test__/dropdown.test.js
@@ -1,3 +1,4 @@
+import React, { useState } from 'react';
import { Icon, Dropdown, Tag } from '../../index';
import { string } from 'prop-types';
import { noop, drop } from 'lodash';
@@ -309,4 +310,5 @@ describe('Dropdown', () => {
DD.update()
expect(DD.find('.semi-dropdown-menu').children().length).toEqual(menu2.length - 1);
});
+
});
diff --git a/packages/semi-ui/dropdown/_story/dropdown.stories.jsx b/packages/semi-ui/dropdown/_story/dropdown.stories.jsx
index 8dfece4c42..f0cad11ea4 100644
--- a/packages/semi-ui/dropdown/_story/dropdown.stories.jsx
+++ b/packages/semi-ui/dropdown/_story/dropdown.stories.jsx
@@ -395,4 +395,67 @@ export function Fix1606() {
);
-}
\ No newline at end of file
+}
+
+export function NestedDropdownIssue() {
+ const [visible, setVisible] = React.useState(false);
+ return (
+
+ {
+ console.log('1. Parent onClickOutSide triggered, closing');
+ setVisible(false);
+ }}
+ render={
+
+ Render 嵌套
+
+
+ console.log('3. Grandchild menu onClick triggered')}>
+ Grandchild Item (Click me)
+
+ console.log('3. Grandchild Item 2 clicked')}>
+ Grandchild Item 2
+
+
+ }
+ >
+ Hover to expand grandchild
+
+ console.log('2. Child menu onClick triggered')}>
+ Child Item
+
+
+ }
+ >
+ Hover to expand child menu
+
+ Menu 嵌套
+ console.log('2. Menu Child Item 1 clicked') },
+ { node: 'item', name: 'Menu Child Item 2', onClick: () => console.log('2. Menu Child Item 2 clicked') },
+ { node: 'divider' },
+ { node: 'item', name: 'Menu Child Item 3', onClick: () => console.log('2. Menu Child Item 3 clicked') },
+ ]}
+ >
+ Click to expand child menu
+
+
+ }
+ >
+
+
+
+ );
+}
diff --git a/packages/semi-ui/dropdown/index.tsx b/packages/semi-ui/dropdown/index.tsx
index 2de272ba87..b5a1407646 100644
--- a/packages/semi-ui/dropdown/index.tsx
+++ b/packages/semi-ui/dropdown/index.tsx
@@ -154,7 +154,10 @@ class Dropdown extends BaseComponent {
}
return (
-
+
@@ -238,7 +241,6 @@ class Dropdown extends BaseComponent
{
zIndex={zIndex}
motion={motion}
margin={margin}
- content={pop}
className={className}
prefixCls={prefixCls}
spacing={spacing}
@@ -249,6 +251,7 @@ class Dropdown extends BaseComponent {
returnFocusOnClose={true}
ref={this.tooltipRef}
{...attr}
+ content={pop}
>
{React.isValidElement(children) ?
React.cloneElement(children, {