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

ListView renderBodyComponent 没有文档 #725

Closed
yjj5855 opened this issue Jan 14, 2017 · 2 comments
Closed

ListView renderBodyComponent 没有文档 #725

yjj5855 opened this issue Jan 14, 2017 · 2 comments

Comments

@yjj5855
Copy link

yjj5855 commented Jan 14, 2017

官方文档只写了 是一个function

本地环境

  • antd-mobile 版本:0.9.12
  • 浏览器 (或标明是 react-native) 及其版本:
  • 运行环境及其版本:

你做了什么?

 <ListView
                    dataSource={dataSource1}
                    renderRow={this.renderRow}
                    renderBodyComponent={()=> <h1>renderBodyComponent</h1>}

                    refreshControl={<RefreshControl
                        refreshing={this.state.refreshing}
                        onRefresh={this.onRefresh}
                    />}
                />

你期待的结果是:

body变成 h1

实际上的结果:

没反应

可重现的在线演示

@warmhug
Copy link
Contributor

warmhug commented Jan 17, 2017

renderBodyComponent 可以很自由的使用,参考 commit 里用法:
image

warmhug added a commit that referenced this issue Jan 17, 2017
@paranoidjk
Copy link
Contributor

ok,@warmhug 是对的,我对React.cloneElement理解有误,删除旧的评论避免误导

@ant-design ant-design locked and limited conversation to collaborators Sep 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants