react-native-animated-dots-carousel
react-native-animated-dots-carousel copied to clipboard
decreasingDots does not work correctly with dynamic data
I'm using react-native-animated-dots-carousel and set the config:
length: 8; maxIndicator: 5;
when I set currentIndex = 0 for render for the first time the decreasingDots worked correctly.
But if I update the length = 7; currentIndex = 6, it will render wrong
expectation:
Why would you use dynamic data? I do not remember supporting it when I built it, or testing something with dynamic data
Why would you use dynamic data? I do not remember supporting it when I built it, or testing something with dynamic data
because my carousel would fetch data from server and I can update on the list by adding/deleting items in the list. The issue came from when I changed currentIndex to the last position of the list and removed the last item, it will show like the second image but my expectation is the 3rd image
@pmtu95 The only thing I can suggest you to do is to re-render the dots with the new data. Re render it completely