toystars / react-native-multiple-select

Simple multi-select component for react-native
MIT License
569 stars 317 forks source link

How to use MultiSelect inside ScrollView? #175

Closed matpiwowarski closed 3 years ago

matpiwowarski commented 3 years ago

Issue summary

I'm using MultiSelect inside ScrollView but I'm getting warning "VirtualizedLists should never be nested inside plain ScrollViews with the same orientation".

How can I get rid of this warning?

darkbasic commented 3 years ago

Did you figure it out?

matpiwowarski commented 3 years ago

I didn't 🙃 I changed the library.

darkbasic commented 3 years ago

@matpiwowarski may I ask you which one you choose?

matpiwowarski commented 3 years ago

https://www.npmjs.com/package/react-native-select-multiple

ahmetgsu commented 3 years ago

Using FlatList instead of ScrollView solved this issue for me.

ghost commented 3 years ago

I used a workaround to bypass this problem hiding the search input and add "fixedHeight" to true <MultiSelect items={Categories} uniqueKey="id" onSelectedItemsChange={onSelectedItemsChange} selectedItems={entry.categories} fixedHeight={true} hideSubmitButton={true} hideTags={true} styleInputGroup={{ display: "none", }} hideDropdown={true} />