`goToIndex` inconsistent behaviour
See original GitHub issueDescribe the bug
Not sure if related to https://github.com/dohooo/react-native-reanimated-carousel/issues/185 but with a similar setup to what’s described in that issue, it seems like goToIndex works nicely going backwards but e.g. calling goToIndex(1)
from index 0 goes to index 2 in the array and animates in the wrong direction…you can briefly see this happening in this gif
To Reproduce Steps to reproduce the behavior:
- Render a carousel like: <Carousel width={300} height={150} data={[1, 2, 3]} onSnapToItem={(index) => console.log(index)} renderItem={({ item }) => ( <Image style={{ width: 300, height: 150 }} source={{ uri: ‘https://images.unsplash.com/photo-1648737154547-b0dfd281c51e?ixlib=rb-1.2.1&ixid=MnwxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1740&q=80’, }} /> )} />
- Add call
carouselRef.current.goToIndex(1)
programmatically or with a button and note that it goes to final index with the incorrect animation
Additional context React native web
Issue Analytics
- State:
- Created a year ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
BUG: Inconsistent behavior of index values for `DataFrame ...
I have checked that this issue has not already been reported. I have confirmed this bug exists on the latest version of pandas....
Read more >The neural computation of inconsistent choice behavior - PMC
Here, we develop a novel index that measures the severity of inconsistency of each choice, enabling us to directly trace its neural correlates....
Read more >Search for Expectancy-Inconsistent Information Reduces ...
The purpose of the present study was to explore the relationship between the need for cognitive closure, cognitive capacity, and the preference ...
Read more >Excel match function producing inconsistent results
Just try to go to the cell H9 and type 7 2 Enter . The cells H10 and H11 are then re-calculated and...
Read more >social value-social behavior inconsistency - JSTOR
matter what the source of social value - social behavior inconsistency, one ... mous index of adjustment level was whether any subject had...
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
In my case, I want to use dynamic index everyTime so i cannot use scrollTo function because it takes static count. Is there any alternative to scroll to specific index?? @dohooo
Try this code.