File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ const UniqueProvider = ({ children }: UniqueProviderProps) => {
173173 arrow = { options . arrow }
174174 motion = { options . popupMotion }
175175 maskMotion = { options . maskMotion }
176- getPopupContainer = { options . getPopupContainer }
176+ // getPopupContainer={options.getPopupContainer}
177177 >
178178 < FloatBg
179179 prefixCls = { prefixCls }
Original file line number Diff line number Diff line change @@ -336,8 +336,15 @@ export function generateTrigger(
336336
337337 // Handle controlled state changes for UniqueProvider
338338 // Only sync to UniqueProvider when it's controlled mode
339+ // If there is a parentContext, don't call uniqueContext methods
339340 useLayoutEffect ( ( ) => {
340- if ( uniqueContext && unique && targetEle && ! openUncontrolled ) {
341+ if (
342+ uniqueContext &&
343+ unique &&
344+ targetEle &&
345+ ! openUncontrolled &&
346+ ! parentContext
347+ ) {
341348 if ( mergedOpen ) {
342349 Promise . resolve ( ) . then ( ( ) => {
343350 uniqueContext . show ( getUniqueOptions ( 0 ) ) ;
@@ -346,7 +353,7 @@ export function generateTrigger(
346353 uniqueContext . hide ( 0 ) ;
347354 }
348355 }
349- } , [ mergedOpen ] ) ;
356+ } , [ mergedOpen , targetEle ] ) ;
350357
351358 const openRef = React . useRef ( mergedOpen ) ;
352359 openRef . current = mergedOpen ;
@@ -384,7 +391,8 @@ export function generateTrigger(
384391 }
385392
386393 // If UniqueContext exists and not controlled, pass delay to Provider instead of handling it internally
387- if ( uniqueContext && unique && openUncontrolled ) {
394+ // If there is a parentContext, don't call uniqueContext methods
395+ if ( uniqueContext && unique && openUncontrolled && ! parentContext ) {
388396 if ( nextOpen ) {
389397 uniqueContext . show ( getUniqueOptions ( delay ) ) ;
390398 } else {
You can’t perform that action at this time.
0 commit comments