pavelbabenko / react-native-awesome-gallery

Performant, native-like, and well-customizable gallery for React Native.
MIT License
498 stars 54 forks source link

^0.3.8 - Interactions not working into a modal component #62

Closed FrSenpai closed 11 months ago

FrSenpai commented 11 months ago

Hey! First, thanks for your work, it seems to be an awesome library.

I'm working on an react native application (0.72.x) and I need to use your "Gallery" or "AwesomeGallery" into a modal, but I can't do any interactions on it.

I'm using react native gesture handler ^2.11.0, and react native reanimated ^3.6.1, and I can say that's animated component works on my custom modal, but not on your component.

I tried to copy/paste your example, but It's the same.

The head of my custom modal component:

<Modal
            animationType="none"
            transparent={true}
            visible={visible}
            onDismiss={onPressToCloseModal}
            style={{width: '100%', flex: 1}}
        >
            <Pressable
                testID="modal_overlay"
                onPress={onPressToCloseModal}
                style={styles.wrapper}
            >
                <MotiView
                    state={animationState}
                    from={{translateY: height}}
                    onDidAnimate={closeOnDidAnimate}
                    style={[styles.wrapper, {backgroundColor: 'transparent'}]}
                >
                    <Pressable
                        onLayout={onLayoutModalContent}
                        style={styles.container}
                    >
                        {children}
                    </Pressable>
                </MotiView>
            </Pressable>
        </Modal>

There isn't any position absolute or anything related to position. Any fix about this one ?

Thanks!

pavelbabenko commented 11 months ago

@FrSenpai Maybe this could help? https://github.com/pavelbabenko/react-native-awesome-gallery/issues/35#issuecomment-951819483

FrSenpai commented 11 months ago

I had it on my app.tsx, but not into my modal... I added it to my custom children component, and now it's working!

You're awesome! A big thanks !