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

iOS 12.2 报错:RCTScrollView may only contain a single subview #40

Open
xinzsky opened this issue May 22, 2019 · 8 comments
Open

iOS 12.2 报错:RCTScrollView may only contain a single subview #40

xinzsky opened this issue May 22, 2019 · 8 comments

Comments

@xinzsky
Copy link

xinzsky commented May 22, 2019

Simulator Screen Shot - iPhone X - 2019-05-22 at 17 37 01

@2534290808
Copy link
Member

请提供更多的代码信息

@xinghuoliaoyuan45
Copy link

me too

@xinghuoliaoyuan45
Copy link

我单独使用 MJRefresh 作为 refreshControl不知道为啥不行

@2534290808
Copy link
Member

2534290808 commented Jun 14, 2019

我单独使用 MJRefresh 作为 refreshControl不知道为啥不行

@xinghuoliaoyuan45 能贴一下你的代码吗?

@smadey
Copy link
Contributor

smadey commented Jun 14, 2019

自己使用了 PanResponder 封装了一个不依赖 Native 的组件,可以自定义下拉刷新(需要 RN 0.59+ 的 hooks),欢迎试用

@jungleyu
Copy link

<MJFlatList data={data} renderItem={({ item, index }) => { return <Text key={index}>{item}</Text>; }} refreshControl={ <MJRefresh> <View style={{ height: 100, alignItems: 'center', justifyContent: 'center' }} > <Text>Pull Down to Refresh...</Text> </View> </MJRefresh> } />
直接使用封装的Flatlist会报这个错。

换成example中的代码就不会
<FlatList data={data} renderItem={({ item, index }) => { return <Text key={index}>{item}</Text>; }} renderScrollComponent={props => ( <MJScrollView refreshControl={ <MJRefresh> <View style={{ height: 100, alignItems: 'center', justifyContent: 'center' }} > <Text>Pull Down to Refresh...</Text> </View> </MJRefresh> } > {props.children} </ScrollView> )} />

@baiachen
Copy link

me too

@weed-x
Copy link

weed-x commented Oct 21, 2020

是不是已经不维护了

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

7 participants