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

TextAreaItem 设置autoHeight属性初次设置值无效 #671

Closed
lnlfps opened this issue Dec 22, 2016 · 1 comment
Closed

TextAreaItem 设置autoHeight属性初次设置值无效 #671

lnlfps opened this issue Dec 22, 2016 · 1 comment

Comments

@lnlfps
Copy link

lnlfps commented Dec 22, 2016

本地环境

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

你做了什么?

设置TextAreaItem的autoHeight属性, 通过value赋值多行文本给该组件

你期待的结果是:

期望控件的高度和内容的高度一致

实际上的结果:

设置值以后,组件只显示了一行的高度,其它行需要scroll才能显示出来,高度没有适配内容。
当用键盘输入任何一个字符是,高度才会适配内容,此时显示正常。

可能出问题的地方:

看来下源代码,可能是直接通过value设置内容,并没有触发onChange事件,而更新高度只在onChange函数里。

@warmhug warmhug assigned pingan1927 and unassigned pingan1927 Dec 22, 2016
warmhug added a commit that referenced this issue Dec 23, 2016
@lock
Copy link

lock bot commented May 28, 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 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants