diff --git a/docs/examples/antd.tsx b/docs/examples/antd.tsx index f5bd0bba..f83aa842 100644 --- a/docs/examples/antd.tsx +++ b/docs/examples/antd.tsx @@ -174,6 +174,7 @@ export class CommonMenu extends React.Component< onOpenChange={onOpenChange} selectedKeys={['3']} overflowedIndicator={overflowedIndicator} + overflowPopupOffset={[10, 15]} {...this.props} > {children} diff --git a/src/Menu.tsx b/src/Menu.tsx index aa50e63b..1fb89658 100644 --- a/src/Menu.tsx +++ b/src/Menu.tsx @@ -107,6 +107,7 @@ export interface MenuProps forceSubMenuRender?: boolean; triggerSubMenuAction?: TriggerSubMenuAction; builtinPlacements?: BuiltinPlacements; + overflowPopupOffset?: number[] // Icon itemIcon?: RenderIconType; @@ -205,6 +206,7 @@ const Menu = React.forwardRef((props, ref) => { // Popup triggerSubMenuAction = 'hover', builtinPlacements, + overflowPopupOffset, // Icon itemIcon, @@ -589,6 +591,7 @@ const Menu = React.forwardRef((props, ref) => { disabled={allVisible} internalPopupClose={len === 0} popupClassName={overflowedIndicatorPopupClassName} + popupOffset={overflowPopupOffset || [10, 15]} > {originOmitItems}