Giter VIP home page Giter VIP logo

Comments (13)

dannysood avatar dannysood commented on May 17, 2024 3

@alexbrillant @webraptor any update on swipe back animation. Would love to have it because excluding the back animation this library is perfect.

from react-native-deck-swiper.

webraptor avatar webraptor commented on May 17, 2024 1

I think you're missing the swipeBack callback function ... https://snack.expo.io/H1t_QvBJQ

Just opened the swiper code and looks like there's no verification if a callback method exists or not, it just calls the method

onSwipedCallbacks = (swipeDirectionCallback, swipedAllCards) => {
    const previousCardIndex = this.state.firstCardIndex
    this.props.onSwiped(previousCardIndex)

    error here ---- >>> swipeDirectionCallback(previousCardIndex)
    if (swipedAllCards) {
      this.props.onSwipedAll()
    }
  }

You can either put an empty callback like in the snack above, or wait for the issue to be fixed in a later PR.

PS: @xavier-villelegier it be great if you could create a new issue with your repro above. thanks.

from react-native-deck-swiper.

xavier-villelegier avatar xavier-villelegier commented on May 17, 2024 1

@webraptor That worked, my bad I just misunderstood the docs on this function. Thanks a lot 👍

from react-native-deck-swiper.

vishalTechnoFreek avatar vishalTechnoFreek commented on May 17, 2024

is it fixed?

from react-native-deck-swiper.

alexbrillant avatar alexbrillant commented on May 17, 2024

@vishalTechnoFreek no

from react-native-deck-swiper.

webraptor avatar webraptor commented on May 17, 2024

Does this occur because swipeDirectionCallback is not a function ?

from react-native-deck-swiper.

angryanatole avatar angryanatole commented on May 17, 2024

any updates on this issue?

from react-native-deck-swiper.

webraptor avatar webraptor commented on May 17, 2024

It is working fine for me. Perhaps you should give more details into what your error is.

from react-native-deck-swiper.

angryanatole avatar angryanatole commented on May 17, 2024

in my case it goes to previous card without animation. it also takes about two seconds to see the previous card.

for now, I ended up using jumpToCardIndex() to go to the previous card.

from react-native-deck-swiper.

webraptor avatar webraptor commented on May 17, 2024

There's no swipeBack animation. If you check the readme, it is in the todo list: Swipe back to the previous card with a custom animation

from react-native-deck-swiper.

xavier-villelegier avatar xavier-villelegier commented on May 17, 2024

@alexbrillant Was it closed because it's fixed ? 🤔

from react-native-deck-swiper.

webraptor avatar webraptor commented on May 17, 2024

@xavier-villelegier yes, fixed a while ago... Still no animation though... But calling swipeBack puts the last swiped card back on top of the deck.

from react-native-deck-swiper.

xavier-villelegier avatar xavier-villelegier commented on May 17, 2024

@webraptor Mmh swipeBack still doesn't work for me though, here is a snack repro.

image

Did I miss something ?

from react-native-deck-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.