@@ -111,6 +111,11 @@ export interface TriggerProps {
111
111
*/
112
112
fresh ?: boolean ;
113
113
114
+ /**
115
+ * Config with UniqueProvider to shared the floating popup.
116
+ */
117
+ unique ?: boolean ;
118
+
114
119
// ==================== Arrow ====================
115
120
arrow ?: boolean | ArrowTypeOuter ;
116
121
@@ -173,6 +178,7 @@ export function generateTrigger(
173
178
stretch,
174
179
getPopupClassNameFromAlign,
175
180
fresh,
181
+ unique,
176
182
177
183
alignPoint,
178
184
@@ -323,7 +329,7 @@ export function generateTrigger(
323
329
// Handle controlled state changes for UniqueProvider
324
330
// Only sync to UniqueProvider when it's controlled mode
325
331
useLayoutEffect ( ( ) => {
326
- if ( uniqueContext && targetEle && ! openUncontrolled ) {
332
+ if ( uniqueContext && unique && targetEle && ! openUncontrolled ) {
327
333
if ( mergedOpen ) {
328
334
Promise . resolve ( ) . then ( ( ) => {
329
335
uniqueContext . show ( getUniqueOptions ( 0 ) ) ;
@@ -370,7 +376,7 @@ export function generateTrigger(
370
376
}
371
377
372
378
// If UniqueContext exists and not controlled, pass delay to Provider instead of handling it internally
373
- if ( uniqueContext && openUncontrolled ) {
379
+ if ( uniqueContext && unique && openUncontrolled ) {
374
380
if ( nextOpen ) {
375
381
uniqueContext . show ( getUniqueOptions ( delay ) ) ;
376
382
} else {
@@ -769,7 +775,7 @@ export function generateTrigger(
769
775
>
770
776
{ triggerNode }
771
777
</ ResizeObserver >
772
- { rendedRef . current && ! uniqueContext && (
778
+ { rendedRef . current && ( ! uniqueContext || ! unique ) && (
773
779
< TriggerContext . Provider value = { context } >
774
780
< Popup
775
781
portal = { PortalComponent }
0 commit comments