question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scrollToIndex view position not consistent

See original GitHub issue

Hi, thank you for building this package, It is really helpful… especially for navigating between list items without providing the item height like FlatList and set initial item index when first viewing the list.

What bothering me now is the item position when the scrollToIndex is called. Sometime the target item is positioned at top, middle or even at the bottom container.

It only happen after calling the scrollToIndex method.

How can i fix this issue, if i remember it well on RN scrollview we can specify where we want the view positioned (top/middle/bottom by using 0.0-1.0 unit).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
arionacommented, Oct 7, 2017

@godness84 You are awesome mate 😄 it’s working perfectly now.

I’ve been suffering from navigating the items in Flalist with variable items.

Any plan for adding support for IOS?

God bless you 👍

1reaction
godness84commented, Oct 6, 2017

You’re right, viewPosition is not respected when animated is set to false and the view is not yet ready on the native side.

It should be fixed in version 0.2.2. Let me know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FlatList scrollToIndex method does not scroll to correct index
But the method is not working as expected and is scrolling to wrong position. I have also tried many workarounds with no use....
Read more >
React Native scrollToIndex - Dynamic size item scroll inside ...
We'll go through: - What React Native scrollToIndex is - How to use scrollToIndex - What is scrollToIndex viewPosition role - How to...
Read more >
FlatList - React Native
Scrolls to the item at the specified index such that it is positioned in the viewable area such that viewPosition 0 places it...
Read more >
iOS 14 UICollectionView scrollToItem not working
iOS 14 UICollectionView scrollToItem not working ... var scrollToIndex: IndexPath? ... flashes the visible cells, then scrolls to the desired position.
Read more >
scrollToIndex not working properly on iOS | Telerik Forums
I'm running into an issue with iOS when I call scrollToIndex. ... scrollToIndex not working properly on iOS. 6 Answers 84 Views. ListView....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found