-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(text-field): Update character counter to update when value is set. #4663
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4663 +/- ##
==========================================
- Coverage 99.26% 98.96% -0.31%
==========================================
Files 129 129
Lines 6294 6294
Branches 821 821
==========================================
- Hits 6248 6229 -19
- Misses 45 64 +19
Partials 1 1
Continue to review full report at Codecov.
|
All 639 screenshot tests passed for commit 837870f vs. |
} | ||
this.setCharacterCounter_(value.length); |
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.
What's the context of this change? any reason for setting this when value is same as native input value?
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.
For frameworks that update the value property on the input, there is no way to trigger the character counter to resynchronize with the value. Since the character counter doesn't have any public apis in the component, this is a way to trigger that update.
Also, this line doesn't apply to the Safari comment so it seems like there wasn't an explicit reason to include this line in the value check.
} | ||
this.setCharacterCounter_(value.length); |
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 add a test case.
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.
LGTM. Please add / update unit test case.
All 642 screenshot tests passed for commit 6a54c56 vs. |
All 645 screenshot tests passed for commit 32e97ea vs. |
32e97ea
to
965f339
Compare
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.
Revert all package-lock.json file changes.
965f339
to
2d12096
Compare
Reverted |
All 645 screenshot tests passed for commit 965f339 vs. |
All 645 screenshot tests passed for commit 2d12096 vs. |
All 645 screenshot tests passed for commit ce53e41 vs. |
No description provided.