react-native-web-swiper icon indicating copy to clipboard operation
react-native-web-swiper copied to clipboard

in iOS ScrollView inside swiper conflict scroll!

Open jakil93 opened this issue 4 years ago • 6 comments

in ios scrollview and swiper scroll sametime... but android is okay.

how to fix that?!

Image of Yaktocat

jakil93 avatar Mar 31 '21 02:03 jakil93

@jakil93 bounces? Also you can try to set positionFixed Swiper prop

oxyii avatar Mar 31 '21 05:03 oxyii

@oxyii still sametime scrolling moving.. 😓

jakil93 avatar Mar 31 '21 06:03 jakil93

@jakil93 I really don't understand what exactly wrong. Did you wanna to hold swiper while ScrollView is moving?

oxyii avatar Mar 31 '21 12:03 oxyii

@oxyii yes! also, while scrollview moving swiper's gesture must disabled!

while swiper's gesture scrollview's scroll must disabled!

i want exactly that!

jakil93 avatar Mar 31 '21 21:03 jakil93

@jakil93 You can control it by your-self. Something like this (not tested):

import { useState } from 'react';

export default () => {
  const [swiperGestureEnabled, setSwiperGestureEnabled] = useState(true);

  return (
    <ScrollView
      onMomentumScrollBegin={() => setSwiperGestureEnabled(false)}
      onMomentumScrollEnd={() => setSwiperGestureEnabled(true)}
    >
      <Swiper gesturesEnabled={swiperGestureEnabled}>
        <View />
        <View />
      </Swiper>
    </ScrollView>
  );
}

oxyii avatar Apr 01 '21 05:04 oxyii

@oxyii Thanks bro! but still while swiper gesture working, also scroll view's scroll wokring..

i try to stop scrollview's scroll using by swiper's onAnimationStart/End. but so slowly...

Do you have another way?

jakil93 avatar Apr 01 '21 06:04 jakil93

the issue seems to be stale. please re-open if this is still needed. thanks

jarvisluong avatar Oct 02 '22 13:10 jarvisluong