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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swipe problems in Modal [iOS 13] #473

Open
m-ruhl opened this issue May 30, 2020 · 7 comments
Open

Swipe problems in Modal [iOS 13] #473

m-ruhl opened this issue May 30, 2020 · 7 comments

Comments

@m-ruhl
Copy link

m-ruhl commented May 30, 2020

Hello 馃憢

Describe the bug
If we use the swipe-list in a modal VC (iOS 13) we cannot swipe completely to the left.

swipe

We are using React-Native-Navigation 6.7.1

      <SwipeListView
        keyExtractor={(item, index) => item.identifier + String(index)}
        onRowOpen={this.bindingOnRowOpen}
        refreshing={false}
        ListEmptyComponent={this.createEmptyComponent}
        data={this.props.location.projectWeek}
        renderItem={this.bindingRenderItem}
        showsVerticalScrollIndicator={false}
        disableRightSwipe={true}
        rightOpenValue={-SwipeableWidth.DEFAULT}
        recalculateHiddenLayout={true}
        renderHiddenItem={this.bindingRenderHiddenItem}
      />

Environment (please complete the following information):

  • OS: iOS 13
  • RNSLV Version: 3.1.0
  • RN Version: 0.61.4

Any ideas to solve this problem?

Thanks
Michael

@jemise111
Copy link
Owner

Hey @m-ruhl, there are a lot of reported problems with interoperability between this library and react-navigation. Because of all the swipe gestures to navigate their library will often become the first responder when a user starts a gesture and I'm not sure if they allow you to override that? A quick search of the docs didn't reveal anything but maybe I missed something.. ? Sorry it's not a better answer

@Synvox
Copy link

Synvox commented Jul 24, 2020

This isn't specific to react-navigation. I ran into this problem with react-native's <Modal> component.

Wrapping the Swipe List in a PanGestureHandler seems capture the touch before it gets to the underlaying Modal.

try:

<PanGestureHandler enabled={true}>
      <SwipeListView
        keyExtractor={(item, index) => item.identifier + String(index)}
        onRowOpen={this.bindingOnRowOpen}
        refreshing={false}
        ListEmptyComponent={this.createEmptyComponent}
        data={this.props.location.projectWeek}
        renderItem={this.bindingRenderItem}
        showsVerticalScrollIndicator={false}
        disableRightSwipe={true}
        rightOpenValue={-SwipeableWidth.DEFAULT}
        recalculateHiddenLayout={true}
        renderHiddenItem={this.bindingRenderHiddenItem}
      />
</PanGestureHandler>

@Duya3fithou
Copy link

PanGestureHandler

I try it, but still not working :(

@nathantqn
Copy link

nathantqn commented Sep 9, 2020

I'm having the same problem with react-native-modal in Android, if you are using react-native-modal, you need to make sure that the attribute swipeDirection="down" of react-native-modal is not enabled. It's a bit annoying, how can I achieve both swipe down gesture for the modal and swipe left/right of list view :(

@nathantqn
Copy link

Hi @m-ruhl, did you find a solution for this?

@akhatriST
Copy link

Quick solution of this is to disable the modal drag gesture, this way the swipe row will receive the gesture and will work accordingly.
Add the drag gesture of Modal on Header or top component so that you are able to drag the Modal as well

xmflsct added a commit to tooot-app/app that referenced this issue Feb 9, 2021
@Andre-Capelli
Copy link

I'm having the same problem, but in my case is with TabView -> 'react-native-tab-view'.
All the other places that I'm using the swipe works perfectly. Do you guys have any idea of what can I do?

React Native: 0.72
TabView: 3.5
Swipe List: 3.2

Gravacao.do.ecra.2023-07-05.as.12.00.27.mov

thanks,
Andr茅

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

7 participants