@@ -105,35 +105,35 @@ const UniqueProvider = ({ children, postTriggerProps }: UniqueProviderProps) =>
105
105
] = useAlign (
106
106
open ,
107
107
popupEle ,
108
- options ?. target ,
109
- options ?. popupPlacement ,
110
- options ?. builtinPlacements || { } ,
111
- options ?. popupAlign ,
108
+ mergedOptions ?. target ,
109
+ mergedOptions ?. popupPlacement ,
110
+ mergedOptions ?. builtinPlacements || { } ,
111
+ mergedOptions ?. popupAlign ,
112
112
undefined , // onPopupAlign
113
113
false , // isMobile
114
114
) ;
115
115
116
116
const alignedClassName = React . useMemo ( ( ) => {
117
- if ( ! options ) {
117
+ if ( ! mergedOptions ) {
118
118
return '' ;
119
119
}
120
120
121
121
const baseClassName = getAlignPopupClassName (
122
- options . builtinPlacements || { } ,
123
- options . prefixCls || '' ,
122
+ mergedOptions . builtinPlacements || { } ,
123
+ mergedOptions . prefixCls || '' ,
124
124
alignInfo ,
125
125
false , // alignPoint is false for UniqueProvider
126
126
) ;
127
127
128
128
return classNames (
129
129
baseClassName ,
130
- options . getPopupClassNameFromAlign ?.( alignInfo ) ,
130
+ mergedOptions . getPopupClassNameFromAlign ?.( alignInfo ) ,
131
131
) ;
132
132
} , [
133
133
alignInfo ,
134
- options ?. getPopupClassNameFromAlign ,
135
- options ?. builtinPlacements ,
136
- options ?. prefixCls ,
134
+ mergedOptions ?. getPopupClassNameFromAlign ,
135
+ mergedOptions ?. builtinPlacements ,
136
+ mergedOptions ?. prefixCls ,
137
137
] ) ;
138
138
139
139
const contextValue = React . useMemo < UniqueContextProps > (
@@ -171,7 +171,7 @@ const UniqueProvider = ({ children, postTriggerProps }: UniqueProviderProps) =>
171
171
return (
172
172
< UniqueContext . Provider value = { contextValue } >
173
173
{ children }
174
- { options && (
174
+ { mergedOptions && (
175
175
< TriggerContext . Provider value = { triggerContextValue } >
176
176
< Popup
177
177
ref = { setPopupRef }
0 commit comments