-
-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Description
Environment
- Expo SDK: ~52.0.33
- Platform: Android
- New Architecture: Enabled
Description
I'm encountering an issue where Pressable
or TouchableOpacity
components inside TrueSheet
are not responding to click events on Android. This appears to be specifically related to the New Architecture being enabled. I also tried this with GestureHandlerRootView
but It did not work.
Expected Behavior
Pressable
orTouchableOpacity
components should respond to click events insideTrueSheet
dismiss()
function should close the sheet when called- Console logs should be triggered on press events
Actual Behavior
Pressable
orTouchableOpacity
components do not respond to clicks insideTrueSheet
Reproduction Steps
import { Button, View } from 'react-native';
import { TrueSheet } from 'react-native-true-sheet';
import { useRef } from 'react';
export default function App() {
const sheet = useRef(null);
// Present the sheet
const present = async () => {
await sheet.current?.present();
console.log('Sheet has been presented');
};
// Dismiss the sheet
const dismiss = async () => {
await sheet.current?.dismiss();
console.log('Sheet dismissed');
};
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Button title="Open Sheet" onPress={present} />
<TrueSheet ref={sheet}>
<View style={{ padding: 20 }}>
<Pressable
onPress={dismiss}
style={({ pressed }) => [
{
backgroundColor: pressed ? '#ddd' : '#fff',
padding: 15,
borderRadius: 8,
},
]}
>
<Text>Close Sheet</Text>
</Pressable>
</View>
</TrueSheet>
</View>
);
}
akuul, ozgurbayram, nicolascavallin, skaionedev and mhsfh
Metadata
Metadata
Assignees
Labels
No labels