6

Is there a way to programatically scroll to bring an element into view, either inside a ListView or ScrollView?

I'm using react-native 0.2+

pomo
  • 2,251
  • 1
  • 21
  • 34
  • 4
    There's iOS / Android `.scrollTo({x:number, y:number, animated:bool})` (syntax since 0.19 I guess) implemented for ScrollView. Use it. You need coordinates of an element for it - http://stackoverflow.com/questions/30096038/react-native-getting-the-position-of-an-element – Samuli Hakoniemi Mar 08 '16 at 19:25
  • Have you ever found a solution to this? I would be interested in scrolling to element in a ListView where the height of the items is not uniform. – Attila Miklosi Nov 23 '16 at 11:20

0 Answers0