Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlattList inside keyboard-aware-scrollview #28

Open
amin79 opened this issue Feb 23, 2023 · 5 comments
Open

FlattList inside keyboard-aware-scrollview #28

amin79 opened this issue Feb 23, 2023 · 5 comments

Comments

@amin79
Copy link

amin79 commented Feb 23, 2023

I have a dropdown inside the keyboard-aware-scrollview which uses FlatList to render the items. But I get error "VirtualizedLists should never be nested inside plain ScrollViews..."

How should I solve this problem?

@mxck
Copy link
Contributor

mxck commented Feb 23, 2023

Hi!
Did you try this solution from readme?

@amin79
Copy link
Author

amin79 commented Feb 23, 2023

Thank you for your answer. Yes. As I understand it return a FlatList. But how it can bee inside a KeyboardAwareScrollView? I don't get it.

@mxck
Copy link
Contributor

mxck commented Feb 23, 2023

Oh sorry, I got it.
There's probably no solution in your case :\

Perhaps only if you show Dropdown in Modal?

@amin79
Copy link
Author

amin79 commented Feb 23, 2023

It’s sad that such a good library can’t do that. Showing that in modal could be the solution. But it’s not nice on web. I think I should use modal on mobile and dropdown on web. Because I don’t get any error on web. Thanks

@borstelmannl
Copy link

borstelmannl commented Mar 7, 2023

Try to use a FlatList instead of the ScrollView. Perhaps try the FlatList Example of this repo or search for another FlatListAwareKeyboard solution. Place all the content in the ListHeaderComponent. A virtualized list in a virtualized list is no problem and should do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants