Comments (18)
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.
Thanks for your report! Can you create a snack with this bug? @afeichuanqi
from react-native-web-swiper.
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.
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.
@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.
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.
@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 I added some minimal distance before swiper will handle gesture (#4).
https://github.com/oxyii/react-native-web-swiper/blob/3517a7f69be3bce835e75876004b520efbbefb77/src/index.js#L86May 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.
@oxyii 有新版本出来吗
from react-native-web-swiper.
@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.
@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.
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.
@afeichuanqi Sure!
from react-native-web-swiper.
@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.
@oxyii https ://github.com/afeichuanqi/demo_swiper
from react-native-web-swiper.
@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.
@afeichuanqi Thank you. I will digging it
from react-native-web-swiper.
It seems that the issue is stale so I will close this one
from react-native-web-swiper.
Related Issues (20)
- Expo Video Component (expo-av) Doesn't fully render in Swiper
- Swiper slider only show when I set hieght for parent view of this.
- Animations
- Even if image state is removed, it is visible in the swiper.
- swiper arrows web
- in iOS ScrollView inside swiper conflict scroll! HOT 7
- Multiple elements HOT 3
- gesturesEnabled problem disable swiper HOT 1
- [Help needed] Rerender different sets of children HOT 1
- Safari Mobile iOS 12, width and height are always equal to 0 HOT 1
- Bouces disable? HOT 7
- Possible to add slides dynamically? HOT 6
- Not displaying in React Native Web HOT 2
- Allow `React.Component`s to be functional components (TypeScript) HOT 4
- Swiper Doesnt Render Anything HOT 4
- Warning: Failed prop type: DefaultControls: prop type `cellsStyle.top-left`
- Fade transition HOT 2
- Issue and Fix: Components not getting prop updates HOT 1
- swipe is not working in android HOT 1
- Disable spring animation.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-web-swiper.