react-native-animated-dots-carousel icon indicating copy to clipboard operation
react-native-animated-dots-carousel copied to clipboard

decreasingDots does not work correctly with dynamic data

Open pmtu95 opened this issue 2 years ago • 3 comments
trafficstars

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. 1

But if I update the length = 7; currentIndex = 6, it will render wrong 2

expectation: 3

pmtu95 avatar Oct 24 '23 07:10 pmtu95

Why would you use dynamic data? I do not remember supporting it when I built it, or testing something with dynamic data

felire avatar Nov 08 '23 17:11 felire

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 avatar Nov 10 '23 06:11 pmtu95

@pmtu95 The only thing I can suggest you to do is to re-render the dots with the new data. Re render it completely

felire avatar Nov 20 '23 16:11 felire