react-native-multi-selectbox icon indicating copy to clipboard operation
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.

Open yhau1989 opened this issue 3 years ago • 5 comments

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

Screen Shot 2022-01-16 at 03 11 50

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>

yhau1989 avatar Jan 16 '22 08:01 yhau1989

please help me

manish-ironman avatar Jan 18 '22 08:01 manish-ironman

how to fixed that

manish-ironman avatar Jan 18 '22 08:01 manish-ironman

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>

yhau1989 avatar Jan 18 '22 10:01 yhau1989

im having same issue can did the above solution work? What props would you pass in the CustomComponent in scrollview?

yashweek avatar Jan 21 '22 16:01 yashweek

https://github.com/sauzy34/react-native-multi-selectbox/issues/62#issuecomment-926353080

check this it will resove your issue

lonewolf416 avatar Mar 11 '22 07:03 lonewolf416