From ec8979acaf413d087051f6629533a32a0c32b49c Mon Sep 17 00:00:00 2001 From: I Putu Saputrayana Date: Tue, 8 Nov 2022 02:27:44 +0800 Subject: [PATCH] fix Card not re-render if state change on parent --- Swiper.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Swiper.js b/Swiper.js index 01b3c7fd..c054a940 100644 --- a/Swiper.js +++ b/Swiper.js @@ -68,7 +68,8 @@ class Swiper extends Component { const { props, state } = this const propsChanged = ( !isEqual(props.cards, nextProps.cards) || - props.cardIndex !== nextProps.cardIndex + props.cardIndex !== nextProps.cardIndex || + props.renderCard !== nextProps.renderCard ) const stateChanged = ( nextState.firstCardIndex !== state.firstCardIndex ||