Code Monkey home page Code Monkey logo

Comments (4)

matias91 avatar matias91 commented on August 21, 2024 1

Hi, @sadique007. Don't know if you resolved this already, but just in case:

renderNoMoreCards is a function that needs to return a component. Also, is called on the render of CardStack, that's why call this.onPressData() will never work as expected (because will execute that when the CardStack component renders, and not when the last card is swiped).

If you need to execute that after last card swiped, maybe you can use onSwiped event, of the Card component. But the logic to identify the last card relies on you 🤷‍♂️ 😞

from react-native-card-stack-swiper.

Ramaraju1992 avatar Ramaraju1992 commented on August 21, 2024

@sadique007 you can call method in onPress like following ways,

<TouchableHighlight onPress={this.onPressData.bind(this,{params_here})} />

or 

<TouchableHighlight onPress={this.onPressData} />

or

<TouchableHighlight onPress={()=>{this.onPressData()}} />

onPressData =()=>{
}

from react-native-card-stack-swiper.

sadique007 avatar sadique007 commented on August 21, 2024

@sadique007 you can call method in onPress like following ways,

<TouchableHighlight onPress={this.onPressData.bind(this,{params_here})} />

or 

<TouchableHighlight onPress={this.onPressData} />

or

<TouchableHighlight onPress={()=>{this.onPressData()}} />

onPressData =()=>{
}

THANKS FOR YOUR RESPONSE!!

but this is not the answer what I am expecting.
I want to call a function without TouchableOpacity/TouchableHighlight/ button. And the function call should be made after last card swipe.

from react-native-card-stack-swiper.

karladler avatar karladler commented on August 21, 2024

Looks like you are actually looking for the onSwipedAll event. Just call your function there.

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