title: ReactNative [Flatlist] scrollToOffset, how do I figure out offset position of clicked row?
body: <p>I want a row in a FlatList to scroll to the top of the screen whenever a user clicks on it. I am currently doing this by using the <code>scrollToIndex</code> method but the problem is that I have to animate the top margin (from 10 to 0) to get it flushed to the top of the screen. I also have an issue where if a user clicks on a row to expand the row, and a previous row was already expanded, the previous row will collapse causing the original scrollToIndex to animate to some position off the top of the screen. </p>
  
  <p>My current two alternatives are to trigger an additional <code>scrollToIndex</code> once the previous row finishes contracting or use <code>scrollToOffset</code> to figure out where to scroll to based on good old math values. Is there a way to figure out row offset positions by index or some other value whenever it is clicked? </p>
  
  <p>Thanks for any help anybody might be able to provide!</p>