Comments (8)
Actually I used https://github.com/Ryanthegiantlion/react-native-tinder-swipe but the code is similar. But yes, that is how I did it. In the panresponder I set a locked state on the component to true and passed that down as a prop to the scrollview.
from react-native-tinder-swipe-cards.
Thanks Ryan,
Ended up passing down a callback to be called
onPanResponderGrant: (e, gestureState) => {
this.props.lock(false);
...
onPanResponderRelease: (e, {vx, vy, dx, dy}) => {
this.props.lock(true);
...
Here is the callback:
lock(mode) {
this.refs.scrollView.setNativeProps({ scrollEnabled: mode });
}
Also I Found an alternative solution, this works great I may move to this: (Ended up using this) https://github.com/mjracca/react-native-scroll-block
from react-native-tinder-swipe-cards.
Maybe you could put it in a modal or remove it from the scrollview somehow?
Maybe loop @brentvatne in
from react-native-tinder-swipe-cards.
The scrollable tab view has a 'locked' property which can be set to prevent scrolling. Setting locked to true in the grant method should solve the issue.
EDIT: FYI the issue is described here. The article talks about scrollview which it seems is what the scrollable tab view uses internally
from react-native-tinder-swipe-cards.
Ever figure this out? I am trying to put this inside a Vertical Scroll View and it does not seem to like, going to see if I can stop the touch events from propagating.
from react-native-tinder-swipe-cards.
So I have seemed to have misplaced the code but I built a prototype using the method I mentioned above. Here is the outcome . . .
from react-native-tinder-swipe-cards.
So you lock and unlock the ScrollView when the PanResponder in SwipeCard.js?
from react-native-tinder-swipe-cards.
Guess the issue can be closed then . . .
from react-native-tinder-swipe-cards.
Related Issues (20)
- When merging cards/adding new cards. Current Card Index is Reset to 0 HOT 1
- Swipe not reacting on yup, nope and maybe positions
- Is this repo maintained anymore?
- Each child Warning HOT 1
- Awesome script... Now, how can I make it loop in the same order (endlessly) ? HOT 1
- Previous image is visible for a short moment when using image url's HOT 2
- Index of Rendered Card
- android support ?
- Show previous card on left to right swipe
- How to change View Background HOT 1
- Undo the removed the card HOT 1
- React-Native-Swipeable-Cards, Forked & Updated HOT 2
- bug swipe animation when adding new cards after renderNoMoreCards HOT 3
- force swipe with buttons HOT 6
- componentWillReceiveProps de
- Swipe cards inside Scroll view HOT 2
- ShowYup at the bottom of the screen HOT 1
- 'Animated: `useNativeDriver` was not specified. HOT 4
- while swipping a card left or right all the cards are swipped together
- THIS REPO IS DEAD! HOT 1
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-tinder-swipe-cards.