Skip to content

Pressable Items Not Responding Inside TrueSheet on Android #135

@fukuli053

Description

@fukuli053

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 or TouchableOpacity components should respond to click events inside TrueSheet
  • dismiss() function should close the sheet when called
  • Console logs should be triggered on press events

Actual Behavior

  • Pressable or TouchableOpacity components do not respond to clicks inside TrueSheet

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>
  );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions