File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ export function useDropdownMenu(options = {}) {
42
42
const modifiers = toModifierMap ( popperConfig . modifiers ) ;
43
43
44
44
const popper = usePopper ( toggleElement , menuElement , {
45
+ ...popperConfig ,
45
46
placement,
46
47
enabled : ! ! ( shouldUsePopper && show ) ,
47
48
modifiers : {
Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ export function toModifierArray(map) {
64
64
* @param {String } options.placement The popper element placement relative to the reference element
65
65
* @param {Boolean } options.positionFixed use fixed positioning
66
66
* @param {Boolean } options.eventsEnabled have Popper listen on window resize events to reposition the element
67
+ * @param {Function } options.onCreate called when the popper is created
68
+ * @param {Function } options.onUpdate called when the popper is updated
67
69
*/
68
70
export default function usePopper (
69
71
referenceElement ,
@@ -74,6 +76,7 @@ export default function usePopper(
74
76
strategy = 'absolute' ,
75
77
eventsEnabled = true ,
76
78
modifiers : userModifiers ,
79
+ ...popperOptions
77
80
} = { } ,
78
81
) {
79
82
const popperInstanceRef = useRef ( ) ;
@@ -152,6 +155,7 @@ export default function usePopper(
152
155
}
153
156
154
157
popperInstanceRef . current = createPopper ( referenceElement , popperElement , {
158
+ ...popperOptions ,
155
159
placement,
156
160
strategy,
157
161
modifiers : [ ...modifiers , updateModifier ] ,
You can’t perform that action at this time.
0 commit comments