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
I want to dynamically add cards. when merging like in the example:
this.setState({ cards: this.state.cards.concat(cards2), outOfCards: true }) if (nextProps.cards !== this.props.cards) { if (this.cardAnimation) { this.cardAnimation.stop(); this.cardAnimation = null; } currentIndex[this.guid] = 0; //Reset to first? this.setState({ cards: [].concat(nextProps.cards), card: nextProps.cards[0] }); }
After concat I get shown the first card of cards1 array. How to preserve the current card and aggregate cards?
The text was updated successfully, but these errors were encountered:
the lib concats the new cards itself. this should be working:
cards: cards2, outOfCards: true }) if (nextProps.cards !== this.props.cards) { if (this.cardAnimation) { this.cardAnimation.stop(); this.cardAnimation = null; } currentIndex[this.guid] = 0; //Reset to first? this.setState({ cards: nextProps.cards, card: nextProps.cards[0] }); }`
Sorry, something went wrong.
No branches or pull requests
I want to dynamically add cards. when merging like in the example:
After concat I get shown the first card of cards1 array. How to preserve the current card and aggregate cards?
The text was updated successfully, but these errors were encountered: