active dot does not update on swipe when children have changed
See original GitHub issueWhich OS ?
IOS and android
Version
Which versions are you using:
- react-native-swiper 1.5.14?
- react-native v0.57.8
Expected behaviour
the active dot changes when i swipe
Actual behaviour
the first dot is always highlighted
How to reproduce it>
<Swiper>
{items.map(item => (
<View key={item._id}><Text>{item.label}</Text></View>
))}
</Swiper>
Steps to reproduce
- make sure that items is empty first []
- on a later render. fill
items
with some objects - active dot is now broken
Workaround:
<Swiper key={items.length}>
{items.map(item => (
<View key={item._id}><Text>{item.label}</Text></View>
))}
</Swiper>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:7 (2 by maintainers)
Top Results From Across the Web
swiper.update() slider wrong amount of pagination dots
I take an invisible div, and append children inside the container and run swiper.update() . The code looks like this: // Mobile image...
Read more >Create swipe views with tabs using ViewPager2
Swipe views allow you to navigate between sibling screens, such as tabs, with a horizontal finger gesture, or swipe. This navigation pattern is...
Read more >Use AssistiveTouch on iPhone - Apple Support
AssistiveTouch helps you use iPhone if you have difficulty touching the screen or pressing the buttons.
Read more >Material Top Tabs Navigator | React Navigation
A material-design themed tab bar on the top of the screen that lets you switch between different routes by tapping the tabs or...
Read more >Affordable Care Act (ACA) And Your Coverage - Veterans Affairs
Does the ACA change my VA health benefits? No. The health care law doesn't change your VA health benefits or your out-of-pocket costs....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
a year later it’s still not resolved. but this will make it work: set the key to the length of your items.
<Swiper key={items.length} style={styles.swiper}> {items} </Swiper>
@macrozone use patch-package and my patch file: