@@ -11,7 +11,6 @@ import warning from 'warning';
11
11
import NavbarContext from './NavbarContext' ;
12
12
import { useBootstrapPrefix } from './ThemeProvider' ;
13
13
import useWrappedRefWithWarning from './useWrappedRefWithWarning' ;
14
- import usePopperMarginModifiers from './usePopperMarginModifiers' ;
15
14
import {
16
15
BsPrefixProps ,
17
16
BsPrefixRefForwardingComponent ,
@@ -155,7 +154,6 @@ const DropdownMenu: BsPrefixRefForwardingComponent<
155
154
) => {
156
155
const isNavbar = useContext ( NavbarContext ) ;
157
156
const prefix = useBootstrapPrefix ( bsPrefix , 'dropdown-menu' ) ;
158
- const [ popperRef , marginModifiers ] = usePopperMarginModifiers ( ) ;
159
157
160
158
const alignClasses : string [ ] = [ ] ;
161
159
if ( align ) {
@@ -195,18 +193,13 @@ const DropdownMenu: BsPrefixRefForwardingComponent<
195
193
show : showProps ,
196
194
alignEnd : alignRight ,
197
195
usePopper : ! isNavbar && alignClasses . length === 0 ,
198
- popperConfig : {
199
- ...popperConfig ,
200
- modifiers : marginModifiers . concat ( popperConfig ?. modifiers || [ ] ) ,
201
- } ,
196
+ offset : [ 0 , 2 ] ,
197
+ popperConfig,
202
198
} ) as UseDropdownMenuValueHack ;
203
199
204
200
menuProps . ref = useMergedRefs (
205
- popperRef ,
206
- useMergedRefs (
207
- useWrappedRefWithWarning ( ref , 'DropdownMenu' ) ,
208
- menuProps . ref ,
209
- ) ,
201
+ useWrappedRefWithWarning ( ref , 'DropdownMenu' ) ,
202
+ menuProps . ref ,
210
203
) ;
211
204
212
205
if ( ! hasShown && ! renderOnMount ) return null ;
0 commit comments