@@ -27,6 +27,10 @@ type Props = {
2727 onMenuClose ?: ( event : SyntheticEvent < > | MouseEvent ) => void ,
2828 /** Handler for dropdown menu open events */
2929 onMenuOpen ?: ( ) => void ,
30+ /** "attachment" prop for the TetherComponent, will overwrite the default settings and ignore isRightAligned option */
31+ tetherAttachment ?: string ,
32+ /** "targetAttachment" prop for the TetherComponent, will overwrite the default settings and ignore isRightAligned option */
33+ tetherTargetAttachment ?: string ,
3034 /** Set true to close dropdown menu on event bubble instead of event capture */
3135 useBubble ?: boolean ,
3236} ;
@@ -187,6 +191,8 @@ class DropdownMenu extends React.Component<Props, State> {
187191 constrainToWindowWithPin,
188192 isResponsive,
189193 isRightAligned,
194+ tetherAttachment,
195+ tetherTargetAttachment,
190196 } = this . props ;
191197
192198 const { isOpen , initialFocusIndex } = this.state;
@@ -261,13 +267,13 @@ class DropdownMenu extends React.Component<Props, State> {
261267
262268 return (
263269 < TetherComponent
264- attachment = { attachment }
270+ attachment = { tetherAttachment || attachment }
265271 bodyElement = { bodyEl }
266272 className = { classNames ( { 'bdl-DropdownMenu--responsive' : isResponsive } , className ) }
267273 classPrefix = "dropdown-menu"
268274 constraints = { constraints }
269275 enabled = { isOpen }
270- targetAttachment = { targetAttachment }
276+ targetAttachment = { tetherTargetAttachment || targetAttachment }
271277 >
272278 { React . cloneElement ( menuButton , menuButtonProps ) }
273279 { isOpen && React . cloneElement ( menu , menuProps ) }
0 commit comments