@@ -35,6 +35,8 @@ import { stringifyAsValue } from '../../utils/resolveValueLabel';
3535import { EMPTY_ARRAY } from '../../utils/constants' ;
3636import { defaultItemEquality , findItemIndex } from '../../utils/itemEquality' ;
3737import { useValueChanged } from '../../utils/useValueChanged' ;
38+ import { useOpenInteractionType } from '../../utils/useOpenInteractionType' ;
39+ import { mergeProps } from '../../merge-props' ;
3840
3941/**
4042 * Groups all parts of the select.
@@ -118,6 +120,11 @@ export function SelectRoot<Value, Multiple extends boolean | undefined = false>(
118120 const alignItemWithTriggerActiveRef = React . useRef ( false ) ;
119121
120122 const { mounted, setMounted, transitionStatus } = useTransitionStatus ( open ) ;
123+ const {
124+ openMethod,
125+ triggerProps : interactionTypeProps ,
126+ reset : resetOpenInteractionType ,
127+ } = useOpenInteractionType ( open ) ;
121128
122129 const store = useRefWithInit (
123130 ( ) =>
@@ -134,7 +141,7 @@ export function SelectRoot<Value, Multiple extends boolean | undefined = false>(
134141 transitionStatus,
135142 items,
136143 forceMount : false ,
137- touchModality : false ,
144+ openMethod : null ,
138145 activeIndex : null ,
139146 selectedIndex : null ,
140147 popupProps : { } ,
@@ -257,6 +264,7 @@ export function SelectRoot<Value, Multiple extends boolean | undefined = false>(
257264 const handleUnmount = useStableCallback ( ( ) => {
258265 setMounted ( false ) ;
259266 store . set ( 'activeIndex' , null ) ;
267+ resetOpenInteractionType ( ) ;
260268 onOpenChangeComplete ?.( false ) ;
261269 } ) ;
262270
@@ -367,10 +375,15 @@ export function SelectRoot<Value, Multiple extends boolean | undefined = false>(
367375 typeahead ,
368376 ] ) ;
369377
378+ const mergedTriggerProps = React . useMemo (
379+ ( ) => mergeProps ( getReferenceProps ( ) , interactionTypeProps ) ,
380+ [ getReferenceProps , interactionTypeProps ] ,
381+ ) ;
382+
370383 useOnFirstRender ( ( ) => {
371384 store . update ( {
372385 popupProps : getFloatingProps ( ) ,
373- triggerProps : getReferenceProps ( ) ,
386+ triggerProps : mergedTriggerProps ,
374387 } ) ;
375388 } ) ;
376389
@@ -384,11 +397,12 @@ export function SelectRoot<Value, Multiple extends boolean | undefined = false>(
384397 mounted,
385398 transitionStatus,
386399 popupProps : getFloatingProps ( ) ,
387- triggerProps : getReferenceProps ( ) ,
400+ triggerProps : mergedTriggerProps ,
388401 items,
389402 itemToStringLabel,
390403 itemToStringValue,
391404 isItemEqualToValue,
405+ openMethod,
392406 } ) ;
393407 } , [
394408 store ,
@@ -400,11 +414,12 @@ export function SelectRoot<Value, Multiple extends boolean | undefined = false>(
400414 mounted ,
401415 transitionStatus ,
402416 getFloatingProps ,
403- getReferenceProps ,
417+ mergedTriggerProps ,
404418 items ,
405419 itemToStringLabel ,
406420 itemToStringValue ,
407421 isItemEqualToValue ,
422+ openMethod ,
408423 ] ) ;
409424
410425 const contextValue : SelectRootContext = React . useMemo (
0 commit comments