@@ -105,35 +105,35 @@ const UniqueProvider = ({ children, postTriggerProps }: UniqueProviderProps) =>
105105 ] = useAlign (
106106 open ,
107107 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 ,
112112 undefined , // onPopupAlign
113113 false , // isMobile
114114 ) ;
115115
116116 const alignedClassName = React . useMemo ( ( ) => {
117- if ( ! options ) {
117+ if ( ! mergedOptions ) {
118118 return '' ;
119119 }
120120
121121 const baseClassName = getAlignPopupClassName (
122- options . builtinPlacements || { } ,
123- options . prefixCls || '' ,
122+ mergedOptions . builtinPlacements || { } ,
123+ mergedOptions . prefixCls || '' ,
124124 alignInfo ,
125125 false , // alignPoint is false for UniqueProvider
126126 ) ;
127127
128128 return classNames (
129129 baseClassName ,
130- options . getPopupClassNameFromAlign ?.( alignInfo ) ,
130+ mergedOptions . getPopupClassNameFromAlign ?.( alignInfo ) ,
131131 ) ;
132132 } , [
133133 alignInfo ,
134- options ?. getPopupClassNameFromAlign ,
135- options ?. builtinPlacements ,
136- options ?. prefixCls ,
134+ mergedOptions ?. getPopupClassNameFromAlign ,
135+ mergedOptions ?. builtinPlacements ,
136+ mergedOptions ?. prefixCls ,
137137 ] ) ;
138138
139139 const contextValue = React . useMemo < UniqueContextProps > (
@@ -171,7 +171,7 @@ const UniqueProvider = ({ children, postTriggerProps }: UniqueProviderProps) =>
171171 return (
172172 < UniqueContext . Provider value = { contextValue } >
173173 { children }
174- { options && (
174+ { mergedOptions && (
175175 < TriggerContext . Provider value = { triggerContextValue } >
176176 < Popup
177177 ref = { setPopupRef }
0 commit comments