We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! 👋
Firstly, thanks for your work on this project! It's a huge help and very convenient to work with.
Today I used patch-package to patch react-native-deck-swiper@2.0.12 for the project I'm working on.
react-native-deck-swiper@2.0.12
I added a prop to allow invoking a callback before the swipe animation begins, in order to build a more responsive interface.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-deck-swiper/Swiper.js b/node_modules/react-native-deck-swiper/Swiper.js index 1a657b3..16567cd 100644 --- a/node_modules/react-native-deck-swiper/Swiper.js +++ b/node_modules/react-native-deck-swiper/Swiper.js @@ -414,6 +414,7 @@ class Swiper extends Component { mustDecrementCardIndex = false ) => { this.setState({ panResponderLocked: true }) + this.props.onSwipedBegin(); this.animateStack() Animated.timing(this.state.pan, { toValue: { @@ -974,6 +975,7 @@ Swiper.defaultProps = { marginBottom: 0, marginTop: 0, onSwiped: cardIndex => { }, + onSwipedBegin: () => { }, onSwipedAborted: () => { }, onSwipedAll: () => { }, onSwipedBottom: cardIndex => { }, diff --git a/node_modules/react-native-deck-swiper/index.d.ts b/node_modules/react-native-deck-swiper/index.d.ts index 1ef616e..06879e9 100644 --- a/node_modules/react-native-deck-swiper/index.d.ts +++ b/node_modules/react-native-deck-swiper/index.d.ts @@ -32,6 +32,7 @@ declare module 'react-native-deck-swiper' { marginBottom?: number; marginTop?: number; onSwiped?: (cardIndex: number) => void; + onSwipedBegin: () => void; onSwipedAborted?: () => void; onSwipedAll?: () => void; onSwipedBottom?: (cardIndex: number) => void;
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi! 👋
Firstly, thanks for your work on this project! It's a huge help and very convenient to work with.
Today I used patch-package to patch
react-native-deck-swiper@2.0.12
for the project I'm working on.I added a prop to allow invoking a callback before the swipe animation begins, in order to build a more responsive interface.
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: