@@ -790,59 +790,59 @@ function ComboBoxOverlay({
790790 // Extract primary placement direction for consistent styling
791791 const placementDirection = placement ?. split ( ' ' ) [ 0 ] || direction ;
792792
793- return (
794- < Portal >
795- < DisplayTransition exposeUnmounted isShown = { isOpen } >
796- { ( { phase, isShown, ref : transitionRef } ) => (
797- < ComboBoxOverlayElement
798- { ...mergeProps ( overlayPositionProps , overlayBehaviorProps ) }
799- ref = { ( value ) => {
800- transitionRef ( value as HTMLElement | null ) ;
801- ( popoverRef as any ) . current = value ;
802- } }
803- data-placement = { placementDirection }
804- data-phase = { phase }
793+ const overlayContent = (
794+ < DisplayTransition exposeUnmounted isShown = { isOpen } >
795+ { ( { phase, isShown, ref : transitionRef } ) => (
796+ < ComboBoxOverlayElement
797+ { ...mergeProps ( overlayPositionProps , overlayBehaviorProps ) }
798+ ref = { ( value ) => {
799+ transitionRef ( value as HTMLElement | null ) ;
800+ ( popoverRef as any ) . current = value ;
801+ } }
802+ data-placement = { placementDirection }
803+ data-phase = { phase }
804+ mods = { {
805+ open : isShown ,
806+ hidden : phase === 'unmounted' ,
807+ } }
808+ styles = { overlayStyles }
809+ style = { {
810+ minWidth : comboBoxWidth ? `${ comboBoxWidth } px` : undefined ,
811+ ...overlayPositionProps . style ,
812+ } }
813+ >
814+ < ListBox
815+ ref = { listBoxRef }
816+ focusOnHover
817+ disableSelectionToggle
818+ id = { `ComboBoxListBox-${ comboBoxId } ` }
819+ aria-label = {
820+ ariaLabel || ( typeof label === 'string' ? label : 'Options' )
821+ }
822+ selectedKey = { effectiveSelectedKey }
823+ selectionMode = "single"
824+ isDisabled = { isDisabled }
825+ disabledKeys = { disabledKeys }
826+ shouldUseVirtualFocus = { true }
827+ items = { items as any }
828+ styles = { listBoxStyles }
829+ optionStyles = { optionStyles }
830+ sectionStyles = { sectionStyles }
831+ headingStyles = { headingStyles }
832+ stateRef = { listStateRef }
805833 mods = { {
806- open : isShown ,
807- hidden : phase === 'unmounted' ,
808- } }
809- styles = { overlayStyles }
810- style = { {
811- minWidth : comboBoxWidth ? `${ comboBoxWidth } px` : undefined ,
812- ...overlayPositionProps . style ,
834+ popover : true ,
813835 } }
836+ onSelectionChange = { onSelectionChange }
814837 >
815- < ListBox
816- ref = { listBoxRef }
817- focusOnHover
818- disableSelectionToggle
819- id = { `ComboBoxListBox-${ comboBoxId } ` }
820- aria-label = {
821- ariaLabel || ( typeof label === 'string' ? label : 'Options' )
822- }
823- selectedKey = { effectiveSelectedKey }
824- selectionMode = "single"
825- isDisabled = { isDisabled }
826- disabledKeys = { disabledKeys }
827- shouldUseVirtualFocus = { true }
828- items = { items as any }
829- styles = { listBoxStyles }
830- optionStyles = { optionStyles }
831- sectionStyles = { sectionStyles }
832- headingStyles = { headingStyles }
833- stateRef = { listStateRef }
834- mods = { {
835- popover : true ,
836- } }
837- onSelectionChange = { onSelectionChange }
838- >
839- { children as any }
840- </ ListBox >
841- </ ComboBoxOverlayElement >
842- ) }
843- </ DisplayTransition >
844- </ Portal >
838+ { children as any }
839+ </ ListBox >
840+ </ ComboBoxOverlayElement >
841+ ) }
842+ </ DisplayTransition >
845843 ) ;
844+
845+ return < Portal > { overlayContent } </ Portal > ;
846846}
847847
848848// ============================================================================
0 commit comments