Help with alphabetized section list

I’m trying to implement an alphabetized list with the scroll bar being the alphabet aligned vertically, where you can drag your finger up and down the alphabet scroll bar and it’ll scroll to the index of the list matching the letter (example).

I can’t seem to get it to scroll to the correct position, and I’m pretty sure that’s because I’m not handling the onLayout properly - how do I get the position of a letter based on the position on the screen?

My code: https://gist.github.com/prodigynelson/110dde0b537217d06043e58ba877cac5
Snack: Unnamed Snack - Snack

Hey @prodigynelson,

Getting an error when loading your snack.

Fixed the snack link
Running the same exact code works locally, not sure why it’s not working in the snack :~(
Okay actually fixed the snack link Unnamed Snack - Snack

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.