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

modal.prompt 不触发 onChange 回调 onPress 取得值是 空 #2204

Closed
ghost opened this issue Dec 29, 2017 · 2 comments · Fixed by #2221
Closed

modal.prompt 不触发 onChange 回调 onPress 取得值是 空 #2204

ghost opened this issue Dec 29, 2017 · 2 comments · Fixed by #2221
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Dec 29, 2017

Version

2.1.2

Environment

2.12

Reproduction link

https://github.com/ant-design/ant-design-mobile/blob/master/components/modal/prompt.tsx

Steps to reproduce

modal.prompt 弹出之后 直接点解 onpress

What is expected?

初始化 data 对象时候 对 dafaultvalue 进行赋值

What is actually happening?

没有赋值

如果不触发 onchange 事件, onpress 拿到的值是空而不是传入的 defaultValue

@ant-design-bot
Copy link

It will be better to write your issue/comment in English, so more people can understand you.
And this means that more people can help you or benefit from your issue/comment.
See: ant-design/ant-design#4897

@paranoidjk paranoidjk self-assigned this Jan 5, 2018
@ant-design-bot
Copy link

Hello @kokiy. Please provide a re-producible demo: https://codepen.io/pen?template=LWpaKe&editors=0010

warmhug pushed a commit that referenced this issue Jan 22, 2018
* fix(Modal): Modal.prompt defaultValue. close #2164 close #2204

* chrore: code style
lixiaoyang1992 pushed a commit to lixiaoyang1992/ant-design-mobile that referenced this issue Apr 26, 2018
)

* fix(Modal): Modal.prompt defaultValue. close ant-design#2164 close ant-design#2204

* chrore: code style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants