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

Issue with scroll and swipe #521

Closed
atifaziz1 opened this issue Feb 10, 2021 · 6 comments
Closed

Issue with scroll and swipe #521

atifaziz1 opened this issue Feb 10, 2021 · 6 comments

Comments

@atifaziz1
Copy link

I am using react-native modal, v11.4.0.

react-native: 0.63.3.
Platform: Ios and Android.

I am facing issue two issues.

For IOS and Android:

  1. if offset is greater than 0, modal swipe down didn't work.

Only for Android:

  1. offset is not persist, when i release scroll and try to again scroll, offset turn to zero again.
    Inside Modal, i have scrollview.

Hope you understand my issue and will help me.

@atifaziz1 atifaziz1 changed the title Issue with scroll Issue with scroll and swipe Feb 10, 2021
@davidseek
Copy link

A few code examples and maybe a quick gif of the problem might get you more reactions.

@mmazzarolo
Copy link
Member

Hi!
I'm closing this issue because it's a question and not a bug report. Please don't take it personally, I'm just trying to make it easier to maintain this project by separating questions from bug reports 🙏.
If you're still looking for feedback/answers, could you please ask your question in a new discussion?
Thank you!

@Nestor231
Copy link

Nestor231 commented May 10, 2022

hi @mmazzarolo , im having similar issues on my end as well. I have a modal that i have enabled swipeDirection down behavior, which has a child scrollview in it.

If I don't enable the swipe function in the modal, the scrollview works, but if swipe function in modal is enabled,
scrollview does not work (or works only when another interactive component (textfield,slider thumb,etc.) has been pressed and held, then dragged)

@RuzenDev
Copy link

AM having the same issue...

Swipe works = Scroll Not Working

Scroll works = Swipe Not Working

@JimTeva
Copy link

JimTeva commented Jan 24, 2024

@atifaziz1 , @Nestor231 , @RuzenDev I just noticed this prop: propagateSwipe, set it to true

@MussadiqAli
Copy link

MussadiqAli commented May 23, 2024

  1. Pass propagateSwipe prop to ReactNativeModal
  2. Use Pressable inside Scrollview,
  3. Add your scrollable content inside Pressable, so Scoll will work fine.
  4. you can swipe outside of Scrollview area.

example:
`
<ReactNativeModal
backdropColor="rgba(50, 62, 72, 0.6)"
backdropOpacity={1}
statusBarTranslucent
swipeDirection={'down'}
propagateSwipe
onSwipeComplete={() => setShow(false)}
useNativeDriver={true}
isVisible={show}>

  <View >
    <View>
         {/*   Swipe will work here  */}
    </View>
    <ScrollView>
      <Pressable>
         {/* Place Scrollable Content here */}
      </Pressable>
    </ScrollView>
  </View>

</ReactNativeModal>

`

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