react-native-multi-selectbox
react-native-multi-selectbox copied to clipboard
VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality - use another VirtualizedList-backed container instead.
Error:
VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality - use another VirtualizedList-backed container instead. at node_modules/react-native/Libraries/Lists/VirtualizedList.js:1115:14 in ScrollView.Context.Consumer.props.children
Code:
<ScrollView nestedScrollEnabled={true} style={{ width: "100%" }}>
<View style={styles.container}>
<SelectBox
label=""
inputPlaceholder="Selecciona"
options={DATA}
value={selectedTeam}
onChange={(val) => setSelectedTeam(val)}
hideInputFilter={true}
/>
</View>
</ScrollView>
please help me
how to fixed that
Try embibe the SelectBox into custom Component
example
export default function CustomComponent (props) {
return (
<View style={styles.container}>
<SelectBox
label=""
inputPlaceholder="Selecciona"
options={DATA}
value={selectedTeam}
onChange={(val) => setSelectedTeam(val)}
hideInputFilter={true}
/>
</View>);
};
<ScrollView nestedScrollEnabled={true} style={{ width: "100%" }}>
<View style={styles.container}>
<CustomComponent />
</View>
</ScrollView>
im having same issue can did the above solution work? What props would you pass in the CustomComponent in scrollview?
https://github.com/sauzy34/react-native-multi-selectbox/issues/62#issuecomment-926353080
check this it will resove your issue