I have a Flat-list in react native which has items that expand & collapse (Just like dropdown), So whenever an item is clicked to expand, If the items content is overflowing in the screen.I want to scroll the item so that its content is fully visible. How can I implement that?
- scrollToIndex won’t work in this case & for scrollToOffset how can i determine the position of the clicked item on screen?
You can use
measureto get the offset of the element, then usescrollToOffset