Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gesture don't work on Model #61

Open
intellij-Shivam opened this issue Jul 27, 2020 · 3 comments
Open

Gesture don't work on Model #61

intellij-Shivam opened this issue Jul 27, 2020 · 3 comments

Comments

@intellij-Shivam
Copy link

I have added a down gesture to a model, and it doesn't recognize it

@Ravi448
Copy link

Ravi448 commented Sep 25, 2020

@intellij-Shivam have got any solution for this?

@gdeusdara
Copy link

gdeusdara commented Jan 19, 2021

Guys, take a look at this facebook/react-native#14295 (comment).
This package is based on PanResponder, so all you have to do is this:

render() {
    /**
     * Im using the TouchableWithoutFeedback with its View as a workaround
     * so that this component is swipable even when it is inside a modal,
     * because modals do not release their responder properly.
     */
    return (
      <Modal>
        <View>
          <GestureRecognizer {...props}>
            <TouchableWithoutFeedback>
              <View>
                
                // The component's content goes here
    
              </View>
            </TouchableWithoutFeedback>
          </GestureRecognizer>
        </View>
      </Modal>
    );
  }

This worked for me (:

@shahjahanpak
Copy link

shahjahanpak commented Jan 5, 2022

You need to wrap your Modal component with GestureRecognizer like so

<GestureRecognizer {...props}>
  <Modal>
        // other code
  </Modal>
</GestureRecognizer>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants