GithubHelp home page GithubHelp logo

Comments (18)

afeichuanqi avatar afeichuanqi commented on June 2, 2024

It has been settled. Break the plug-in's gesture permissions from the beginning.

Use:

OnStart ShouldSetPanResponder: (evt, gesture State) => true,

OnStart ShouldSetPanResponder Capture: (evt, gesture State) => true,

OnMoveShouldSetPanResponder: (evt, gesture State) => true,

OnMoveShouldSetPanResponder Capture: (evt, gesture State) => true,

Prevent react-navigation from getting secondary privileges leading to abnormal sliding

from react-native-web-swiper.

oxyii avatar oxyii commented on June 2, 2024

Thanks for your report! Can you create a snack with this bug? @afeichuanqi

from react-native-web-swiper.

afeichuanqi avatar afeichuanqi commented on June 2, 2024

Thanks for your report! Can you create a snack with this bug? @afeichuanqi

Just tried it and it didn't work out.

OnStart ShouldSetPanResponder: (evt, gesture State) => true,

OnStart ShouldSetPanResponder Capture: (evt, gesture State) => true,

OnMoveShouldSetPanResponder: (evt, gesture State) => true,

OnMoveShouldSetPanResponder Capture: (evt, gesture State) => true,

Interception of privileges will cause onPress to fail to click. I don't know how to show it to you because I haven't used Expo. I hope there is a solution. The top bar of react-navigation will slide ahead of your plug-in.

from react-native-web-swiper.

afeichuanqi avatar afeichuanqi commented on June 2, 2024

I've tried several swiper plug-ins that don't solve my problem. There are small bugs. Maybe I used swiper in Scrollview of react-native topbar to cause various swiper plug-in bugs

from react-native-web-swiper.

oxyii avatar oxyii commented on June 2, 2024

@afeichuanqi I can try to reproduce it after weekend only. But you can try to make a snack. Expo includes native modules of react-navigation. If problem exactly with swiper copabality with react-navigation then it must replay on snack

from react-native-web-swiper.

afeichuanqi avatar afeichuanqi commented on June 2, 2024

Perhaps it's because react-native-gesture-handler, which react-navigation defaults to, makes react-native's own touch impossible to truncate its privileges.

from react-native-web-swiper.

oxyii avatar oxyii commented on June 2, 2024

@afeichuanqi I added some minimal distance before swiper will handle gesture (#4).
https://github.com/oxyii/react-native-web-swiper/blob/3517a7f69be3bce835e75876004b520efbbefb77/src/index.js#L86
May be this is a problem? Can you share minimal part of your case for reproducing?

from react-native-web-swiper.

afeichuanqi avatar afeichuanqi commented on June 2, 2024

@afeichuanqi I added some minimal distance before swiper will handle gesture (#4).
https://github.com/oxyii/react-native-web-swiper/blob/3517a7f69be3bce835e75876004b520efbbefb77/src/index.js#L86

May be this is a problem? Can you share minimal part of your case for reproducing?

The most important part of the problem is that react-navigation is greater than your native touch gesture permission, causing the gesture to respond to navigation when the child component slides.
So I can't solve the problem of not breaking the navigation gesture.

from react-native-web-swiper.

afeichuanqi avatar afeichuanqi commented on June 2, 2024

@oxyii 有新版本出来吗

from react-native-web-swiper.

oxyii avatar oxyii commented on June 2, 2024

@afeichuanqi I can't speak chinesse. Thank to Google Translator:

Is there a new version?

Nope. I'm waiting a snack with reproducing from you

from react-native-web-swiper.

afeichuanqi avatar afeichuanqi commented on June 2, 2024

@oxyii I try to

OnMoveShouldSetPanResponderCapture: (a, c) = > {

If (! This. Props. SwipingEnabled) return! 1;

This. Props. OnAnimationStart && enclosing props. The onAnimationStart ();

Const d = 5 < b("row" == this. Props. Direction? C.d x: c.d y);

Return true;

},

Let him always return true; It works on android, but my item doesn't have an onClick event anymore. I'd love to give you a demo but the project is complicated and messy. So it's hard to give you a demo

from react-native-web-swiper.

oxyii avatar oxyii commented on June 2, 2024

@afeichuanqi

Let him always return true

<Swiper minDistanceToCapture={0}>
...
</Swiper>

So, https://github.com/oxyii/react-native-web-swiper/blob/d3d19de0ac243f857b9dc644a09b3cac8ce52283/src/Swiper.js#L110-L112 will return true on any gesture action

from react-native-web-swiper.

oxyii avatar oxyii commented on June 2, 2024

@afeichuanqi Sure!

from react-native-web-swiper.

afeichuanqi avatar afeichuanqi commented on June 2, 2024

@oxyii 我已经发布在github https ://github.com/afeichuanqi/demo_swiper/tree/master ,There is an mp4 in the /data directory for you to see

from react-native-web-swiper.

afeichuanqi avatar afeichuanqi commented on June 2, 2024

@oxyii https ://github.com/afeichuanqi/demo_swiper

from react-native-web-swiper.

afeichuanqi avatar afeichuanqi commented on June 2, 2024

@oxyii Thank you very much for helping me. I have temporarily chosen another one that is more suitable for my business in some ways. It's bothering you, too.

from react-native-web-swiper.

oxyii avatar oxyii commented on June 2, 2024

@afeichuanqi Thank you. I will digging it

from react-native-web-swiper.

jarvisluong avatar jarvisluong commented on June 2, 2024

It seems that the issue is stale so I will close this one

from react-native-web-swiper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.