@@ -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 : { } ,
@@ -250,6 +257,7 @@ export function SelectRoot<Value, Multiple extends boolean | undefined = false>(
250257 const handleUnmount = useStableCallback ( ( ) => {
251258 setMounted ( false ) ;
252259 store . set ( 'activeIndex' , null ) ;
260+ resetOpenInteractionType ( ) ;
253261 onOpenChangeComplete ?.( false ) ;
254262 } ) ;
255263
@@ -360,10 +368,15 @@ export function SelectRoot<Value, Multiple extends boolean | undefined = false>(
360368 typeahead ,
361369 ] ) ;
362370
371+ const mergedTriggerProps = React . useMemo (
372+ ( ) => mergeProps ( getReferenceProps ( ) , interactionTypeProps ) ,
373+ [ getReferenceProps , interactionTypeProps ] ,
374+ ) ;
375+
363376 useOnFirstRender ( ( ) => {
364377 store . update ( {
365378 popupProps : getFloatingProps ( ) ,
366- triggerProps : getReferenceProps ( ) ,
379+ triggerProps : mergedTriggerProps ,
367380 } ) ;
368381 } ) ;
369382
@@ -377,11 +390,12 @@ export function SelectRoot<Value, Multiple extends boolean | undefined = false>(
377390 mounted,
378391 transitionStatus,
379392 popupProps : getFloatingProps ( ) ,
380- triggerProps : getReferenceProps ( ) ,
393+ triggerProps : mergedTriggerProps ,
381394 items,
382395 itemToStringLabel,
383396 itemToStringValue,
384397 isItemEqualToValue,
398+ openMethod,
385399 } ) ;
386400 } , [
387401 store ,
@@ -393,11 +407,12 @@ export function SelectRoot<Value, Multiple extends boolean | undefined = false>(
393407 mounted ,
394408 transitionStatus ,
395409 getFloatingProps ,
396- getReferenceProps ,
410+ mergedTriggerProps ,
397411 items ,
398412 itemToStringLabel ,
399413 itemToStringValue ,
400414 isItemEqualToValue ,
415+ openMethod ,
401416 ] ) ;
402417
403418 const contextValue : SelectRootContext = React . useMemo (
0 commit comments