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

无法上拉加载更多 #25

Open
f111fei opened this issue Jun 22, 2017 · 1 comment
Open

无法上拉加载更多 #25

f111fei opened this issue Jun 22, 2017 · 1 comment

Comments

@f111fei
Copy link

f111fei commented Jun 22, 2017

环境: android

第一次上拉的时候显示了footer并且正常执行了onLoadMore , 加载到了数据之后, 继续向上拉,当第二次达到列表尾部时, 这时候footer被隐藏了没有执行onLoadMore

看了下源码,原因应该是

this._canLoadMore 这个变量第一次onLoadMore之后就被设置成false,导致之后无法继续加载

下面是我的代码:

<PullToRefreshListView
                viewType={PullToRefreshListView.constants.viewType.listView}
                ref={comp => this._pullToRefreshListView = comp}
                dataSource={this.state.ds}
                renderRow={this.renderRow.bind(this)}
                renderHeader={this.renderRefreshHeader.bind(this)}
                renderFooter={this.renderFooter.bind(this)}
                removeClippedSubviews={true}
                enableEmptySections
                pagingEnabled={false}
                pageSize={28}
                initialListSize={28}
                onEndReachedThreshold={10}
                onLoadMore={this.onLoadMore.bind(this)}
                onRefresh={this.onRefresh.bind(this)}
                autoLoadMore={true}
            >
</PullToRefreshListView>
@atlas1119
Copy link

我的也是,感觉算_canLoadMore 有问题

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

2 participants