@@ -14,17 +14,17 @@ const initialPopperStyles: Partial<CSSStyleDeclaration> = {
14
14
const initialArrowStyles = { } ;
15
15
16
16
// until docjs supports type exports...
17
- export type Modifier < T > = Popper . Modifier < T > ;
17
+ export type Modifier < Name , Options > = Popper . Modifier < Name , Options > ;
18
18
export type Options = Popper . Options ;
19
19
export type Instance = Popper . Instance ;
20
20
export type Placement = Popper . Placement ;
21
21
export type VirtualElement = Popper . VirtualElement ;
22
22
export type State = Popper . State ;
23
23
24
- export type ModifierMap = Record < string , Partial < Modifier < any > > > ;
24
+ export type ModifierMap = Record < string , Partial < Modifier < any , any > > > ;
25
25
export type Modifiers =
26
- | Partial < Modifier < any > > [ ]
27
- | Record < string , Partial < Modifier < any > > > ;
26
+ | Popper . Options [ 'modifiers' ]
27
+ | Record < string , Partial < Modifier < any , any > > > ;
28
28
29
29
export function toModifierMap ( modifiers : Modifiers | undefined ) {
30
30
const result : Modifiers = { } ;
@@ -114,7 +114,7 @@ function usePopper(
114
114
} ) ,
115
115
) ;
116
116
117
- const updateModifier = useMemo < Modifier < any > > (
117
+ const updateModifier = useMemo < Modifier < 'updateStateModifier' , any > > (
118
118
( ) => ( {
119
119
name : 'updateStateModifier' ,
120
120
enabled : true ,
@@ -123,7 +123,7 @@ function usePopper(
123
123
fn : ( data ) => {
124
124
setState ( {
125
125
scheduleUpdate,
126
- outOfBoundaries : data . state . modifiersData . hide ?. isReferenceHidden ,
126
+ outOfBoundaries : ! ! data . state . modifiersData . hide ?. isReferenceHidden ,
127
127
placement : data . state . placement ,
128
128
styles : { ...data . state . styles ?. popper } ,
129
129
arrowStyles : { ...data . state . styles ?. arrow } ,
0 commit comments