akveo / react-native-ui-kitten

:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/react-native-ui-kitten/
MIT License
10.28k stars 951 forks source link

Scroll to selectedOption when select is opened #822

Open artyorsh opened 4 years ago

artyorsh commented 4 years ago

🚀 Feature Proposal

When the last item in the list (or anyone below the cutoff) is selected and then the select list displayed again, it'd be really useful for the selected item to be scrolled into view.

Motivation

User request https://github.com/akveo/react-native-ui-kitten/issues/794#issuecomment-570787247

Example

https://www.loom.com/share/3a5d1df5f4b84b2297d27848aa52038b

ArturTimoxin commented 3 years ago

I had the same problem with the Select component, and as I see it has a nested List component that uses FlatList.

In my opinion, It is impossible to get a ref of the FlatList component.

How can I get it? Maybe kitten UI Select can use forwardRef for get ref of FlatList component?

I saw an issue with the same proposition https://github.com/akveo/react-native-ui-kitten/issues/955