Skip to content
New issue

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

It is not rendering the second card #32

Closed
harrymash2006 opened this issue Oct 8, 2020 · 2 comments
Closed

It is not rendering the second card #32

harrymash2006 opened this issue Oct 8, 2020 · 2 comments

Comments

@harrymash2006
Copy link

Please help. After updating from 1.6.7 it is not showing second card.

I am using this code

<Swiper
ref={swiper => {
this.swiper = swiper;
}}
cardStyle={this.getCardStyle}
inputRotationRange={[0, 0, 0]}
outputRotationRange={["0deg", "0deg", "0deg"]}
infinite={true}
onSwipedLeft={this._onSwipedRight}
onSwipedRight={this._onSwipedLeft}
cards={this.state.feeds}
renderCard={this._renderCard}
onSwipedTop={this._onSwiped}
onSwipedBottom={this._onSwipedBottom}
horizontalSwipe={this.state.horizontalSwipe}
verticalSwipe={(this.state.feeds.length >= 1 || this.state.verticalSwipe )?true:false}
goBackToPreviousCardOnSwipeBottom={true}
onSwipedAll={this._onSwipedAll}
cardIndex={this.state.currentIndex}
backgroundColor={'#fff'}
keyExtractor={item => item.n_id}
cardVerticalMargin={0}
marginBottom={0}
horizontalThreshold={width/2}
cardHorizontalMargin={0}
onTapCard={this._ontapcard}
/>

and in _onSwiped function I am changing the value of currentIndex (cardIndex). Please help. After I swipe it is just showing blank screen.

@webraptor
Copy link
Owner

Please post a snack or something similar so that it is easy to reproduce your issue.

@harrymash2006
Copy link
Author

Sorry, I think it was because of these values. It is working now after removing the below values
inputRotationRange={[0, 0, 0]}
outputRotationRange={["0deg", "0deg", "0deg"]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants