Skip to content

PullView中flex失效问题; #46

Description

@chj-damon

在项目中用到PullView,但是发现PullView里面的元素采用flex布局的话不生效。我的代码结构如下:
<View style={{ flex: 1 }}> <PullView style={{ flex: 1 }}> <Image style={{ height: 200 }}/> <View style={{ flex: 1 }}>...</View> </PullView> </View>
查看源码之后发现PullView.js的getScrollable方法返回的是一个ScrollView,但是ScrollView上面并没有contentContainerStyle属性,导致flex:1在ScrollView层断了,无法被ScrollView里面的元素继承。

建议:
在PullView上增加一个contentContainerStyle的props;或者默认使用flex:1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions