Reputation: 11
I try to render a dropdown-picker (react-native-dropdownpicker) in a sectionlist but it's impossable to scroll the content of the dropdown. It only shows the first results.
I tried many things with zIndex, view with flex: 1 as parent but im unable to find the solution.
Is it possible to render in a sectionlist or should i be looking for another solution?
sectionlist with dropdown-picker
Upvotes: 1
Views: 1272
Reputation: 100
I think this is what you want.
List Modes
You have 3 options when choosing the list mode.
DEFAULT
FLATLIST
SCROLLVIEW
MODAL
listMode="FLATLIST
"
Notes
The FlatList
component shouldn't be nested inside ScrollView
or you'll come across the VirtualizedLists should never be nested inside plain ScrollViews
warning.
If this happens to you and you only have a few items, consider using the SCROLLVIEW
mode. Otherwise, you have to use the MODAL
mode.
Take a look at this snack:
https://snack.expo.dev/@devsaeedhabibi/dropdown-picker
Upvotes: 1