-
Notifications
You must be signed in to change notification settings - Fork 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(module:input-number): fix display value after formatter changed #1371
Conversation
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.
please update your code to fix ci.
451c787
to
b213870
Compare
Codecov Report
@@ Coverage Diff @@
## master #1371 +/- ##
==========================================
+ Coverage 97.02% 97.07% +0.04%
==========================================
Files 196 196
Lines 8339 8402 +63
Branches 1102 1136 +34
==========================================
+ Hits 8091 8156 +65
Misses 31 31
+ Partials 217 215 -2
Continue to review full report at Codecov.
|
@csyszf please add test for the change, thanks. |
b213870
to
2fb9347
Compare
@vthinkxie test added. |
@Input() | ||
set nzFormatter(v: (value: number) => string | number) { | ||
this._formatter = v; | ||
this.writeValue(Number(this.actualValue)); |
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.
should be this.getCurrentValidValue(this.actualValue)
2fb9347
to
94fa7a0
Compare
@vthinkxie |
@csyszf maybe not I think. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
After nzFormatter changed, the text on element will not apply the new formatter, unless changes value or unfocus.
What is the new behavior?
Text updates immediately if formatter changed.
Does this PR introduce a breaking change?
Other information