reactrondev / react-native-web-swiper

Swiper-Slider for React-Native and React-Native-Web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

in iOS ScrollView inside swiper conflict scroll!

jakil93 opened this issue · comments

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

how to fix that?!

Image of Yaktocat

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

@oxyii still sametime scrolling moving.. 😓

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

@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 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
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?

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