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

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. #74

Open
yhau1989 opened this issue Jan 16, 2022 · 5 comments

Comments

@yhau1989
Copy link

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>
@manish-ironman
Copy link

please help me

@manish-ironman
Copy link

how to fixed that

@yhau1989
Copy link
Author

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>

@yashweek
Copy link

yashweek commented Jan 21, 2022

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

@lonewolf416
Copy link

#62 (comment)

check this it will resove your issue

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

4 participants