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) => {
173
173
arrow = { options . arrow }
174
174
motion = { options . popupMotion }
175
175
maskMotion = { options . maskMotion }
176
- getPopupContainer = { options . getPopupContainer }
176
+ // getPopupContainer={options.getPopupContainer}
177
177
>
178
178
< FloatBg
179
179
prefixCls = { prefixCls }
Original file line number Diff line number Diff line change @@ -336,8 +336,15 @@ export function generateTrigger(
336
336
337
337
// Handle controlled state changes for UniqueProvider
338
338
// Only sync to UniqueProvider when it's controlled mode
339
+ // If there is a parentContext, don't call uniqueContext methods
339
340
useLayoutEffect ( ( ) => {
340
- if ( uniqueContext && unique && targetEle && ! openUncontrolled ) {
341
+ if (
342
+ uniqueContext &&
343
+ unique &&
344
+ targetEle &&
345
+ ! openUncontrolled &&
346
+ ! parentContext
347
+ ) {
341
348
if ( mergedOpen ) {
342
349
Promise . resolve ( ) . then ( ( ) => {
343
350
uniqueContext . show ( getUniqueOptions ( 0 ) ) ;
@@ -346,7 +353,7 @@ export function generateTrigger(
346
353
uniqueContext . hide ( 0 ) ;
347
354
}
348
355
}
349
- } , [ mergedOpen ] ) ;
356
+ } , [ mergedOpen , targetEle ] ) ;
350
357
351
358
const openRef = React . useRef ( mergedOpen ) ;
352
359
openRef . current = mergedOpen ;
@@ -384,7 +391,8 @@ export function generateTrigger(
384
391
}
385
392
386
393
// 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 ) {
388
396
if ( nextOpen ) {
389
397
uniqueContext . show ( getUniqueOptions ( delay ) ) ;
390
398
} else {
You can’t perform that action at this time.
0 commit comments