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
feat(module:input): textarea supports character count #6104
Conversation
This preview will be available after the AzureCI is passed. |
Codecov Report
@@ Coverage Diff @@
## master #6104 +/- ##
==========================================
- Coverage 89.86% 89.82% -0.04%
==========================================
Files 467 468 +1
Lines 14214 14238 +24
Branches 2238 2238
==========================================
+ Hits 12773 12789 +16
- Misses 890 893 +3
- Partials 551 556 +5
Continue to review full report at Codecov.
|
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class NzTextareaCountComponent implements AfterContentInit, OnDestroy { | ||
@ContentChild(NzInputDirective, { static: true }) nzInputDirective!: NzInputDirective; |
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.
This doesn't need to be static: true, does it?
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.
thx review, dynamic content will make matching targets more complex, in which case I think it's enough for developers.
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.
The static flag isn't about dynamic content, it's about lifecycle, and static true is deprecated so it has to be removed anyway. In here it can be removed without any additional effort.
97e4700
to
0575781
Compare
0575781
to
8ab5043
Compare
close #5907
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?
Issue Number: #5907
What is the new behavior?
It now supports displaying character count at the bottom-right corner below the textarea. User can customize max length and character count computation function.
Does this PR introduce a breaking change?
Other information