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

<Row></Row>组件在同一行闭合会报错? #2603

Closed
xieyihao opened this issue Aug 3, 2016 · 7 comments
Closed

<Row></Row>组件在同一行闭合会报错? #2603

xieyihao opened this issue Aug 3, 2016 · 7 comments
Assignees
Labels
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@xieyihao
Copy link

xieyihao commented Aug 3, 2016

本地环境

Node版本:v4.4.7
npm版本:3.10.5

  • antd 版本:
    v1.7.0
  • 操作系统及其版本:
    Microsoft Windows [版本 10.0.10586]
  • 浏览器及其版本:
    Chrome 版本 52.0.2743.82 m

你做了什么?

引入了组件

<Row>  
   { this._renderThead()}  
 </Row>

想把合并到同一行
<Row> { this._renderThead()} </Row>

你期待的结果是:

正常运行

实际上的结果:

报错了

TypeError: Cannot read property 'style' of undefined

可重现的在线演示

@xieyihao
Copy link
Author

xieyihao commented Aug 3, 2016

image

@xieyihao
Copy link
Author

xieyihao commented Aug 3, 2016

好奇怪的问题啊,也没找到是什么原因

@afc163 afc163 added the 🐛 Bug Ant Design Team had proved that this is a bug. label Aug 3, 2016
@afc163 afc163 assigned afc163 and unassigned benjycui Aug 3, 2016
@afc163
Copy link
Member

afc163 commented Aug 3, 2016

- <Row> { this._renderThead()} </Row>
+ <Row>{this._renderThead()}</Row>

内容里的空格触发了报错。

@xieyihao
Copy link
Author

xieyihao commented Aug 3, 2016

刚刚删掉了空格测试了下,确实正常了。
但有空格也报错,太奇怪了,修复下?

afc163 added a commit that referenced this issue Aug 3, 2016
@afc163 afc163 closed this as completed Aug 3, 2016
@afc163
Copy link
Member

afc163 commented Aug 3, 2016

Done 🎅

@xieyihao
Copy link
Author

xieyihao commented Aug 3, 2016

太有速度了吧 !!

@lock
Copy link

lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 Bug Ant Design Team had proved that this is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants