Skip to content

fix Card not re-render if state change on parent - #89

Open
iyansr wants to merge 1 commit into
webraptor:masterfrom
iyansr:patch-1
Open

fix Card not re-render if state change on parent#89
iyansr wants to merge 1 commit into
webraptor:masterfrom
iyansr:patch-1

Conversation

@iyansr

@iyansr iyansr commented Nov 7, 2022

Copy link
Copy Markdown

Related: #85

@iyansr

iyansr commented Nov 7, 2022

Copy link
Copy Markdown
Author

@webraptor Hi, i made some changes related to #85.
I also facing same issues,

can you please merge and release asap?

thank you

@webraptor webraptor left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't see how this helps. Please provide extra info on the change, testing etc.

Comment thread Swiper.js
!isEqual(props.cards, nextProps.cards) ||
props.cardIndex !== nextProps.cardIndex
props.cardIndex !== nextProps.cardIndex ||
props.renderCard !== nextProps.renderCard

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iyansr how does comparing the renderCard function help? I'm pretty sure it will not work or improve the swiper in any way, at least not without introducing a lot of other issues for other people.

@hmdrx

hmdrx commented Apr 12, 2023

Copy link
Copy Markdown

@iyansr Thanks this code worked for me. I am using this deck swiper to render questions. and my requirement was, whenever the user tap on the card user should view their answer on the card, This could happen because of your code. I added your code in node_modules directly.

@iyansr

iyansr commented Apr 13, 2023

Copy link
Copy Markdown
Author

glad it helps @hmdrx !

@iyansr

iyansr commented Apr 13, 2023

Copy link
Copy Markdown
Author

@webraptor seems like someone have similar problem :D

@ShiyuCheng2018

Copy link
Copy Markdown

Thank you and it works @iyansr

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

Successfully merging this pull request may close these issues.

4 participants