@@ -15,6 +15,7 @@ import { Text } from '~/components/ui/text';
15
15
16
16
export default function SelectScreen ( ) {
17
17
const triggerRef = React . useRef < React . ElementRef < typeof SelectTrigger > > ( null ) ;
18
+ const triggerScollableRef = React . useRef < React . ElementRef < typeof SelectTrigger > > ( null ) ;
18
19
const insets = useSafeAreaInsets ( ) ;
19
20
const contentInsets = {
20
21
top : insets . top ,
@@ -37,7 +38,14 @@ export default function SelectScreen() {
37
38
/>
38
39
< View className = 'flex-1 justify-center items-center' >
39
40
< Select defaultValue = { { value : 'apple' , label : 'Apple' } } >
40
- < SelectTrigger ref = { triggerRef } className = 'w-[250px]' >
41
+ < SelectTrigger
42
+ ref = { triggerRef }
43
+ className = 'w-[250px]'
44
+ onTouchStart = { ( ) => {
45
+ // Temporary fix for https://github.com/mrzachnugent/react-native-reusables/issues/343#issuecomment-2779827475
46
+ triggerRef . current ?. open ( ) ;
47
+ } }
48
+ >
41
49
< SelectValue
42
50
className = 'text-foreground text-sm native:text-lg'
43
51
placeholder = 'Select a fruit'
@@ -68,7 +76,14 @@ export default function SelectScreen() {
68
76
< View >
69
77
< Text className = 'text-center text-muted-foreground pb-2' > With scroll view</ Text >
70
78
< Select defaultValue = { { value : 'apple' , label : 'Apple' } } >
71
- < SelectTrigger className = 'w-[250px]' >
79
+ < SelectTrigger
80
+ ref = { triggerScollableRef }
81
+ className = 'w-[250px]'
82
+ onTouchStart = { ( ) => {
83
+ // Temporary fix for https://github.com/mrzachnugent/react-native-reusables/issues/343#issuecomment-2779827475
84
+ triggerScollableRef . current ?. open ( ) ;
85
+ } }
86
+ >
72
87
< SelectValue
73
88
className = 'text-foreground text-sm native:text-lg'
74
89
placeholder = 'Select a fruit'
0 commit comments