feat(module:input-number): add nzBlur and nzFocus outputs#9098
Conversation
|
This preview will be available after the AzureCI is passed. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #9098 +/- ##
==========================================
- Coverage 92.01% 92.00% -0.01%
==========================================
Files 564 564
Lines 20026 20030 +4
Branches 3107 3107
==========================================
+ Hits 18426 18429 +3
- Misses 1261 1262 +1
Partials 339 339 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds new output events (nzBlur and nzFocus) to the input-number component to support focus and blur callbacks and updates the related documentation.
- Introduces nzBlur and nzFocus outputs in the component.
- Updates the subscription logic to emit the corresponding events on focus/blur.
- Updates both Chinese and English documentation to reflect the new outputs.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| components/input-number/input-number.component.ts | Added nzBlur and nzFocus outputs and updated event logic. |
| components/input-number/doc/index.zh-CN.md | Added documentation for nzBlur and nzFocus. |
| components/input-number/doc/index.en-US.md | Added documentation for nzBlur and nzFocus. |
Comments suppressed due to low confidence (2)
components/input-number/input-number.component.ts:195
- New outputs nzBlur and nzFocus have been introduced here. Consider adding tests to verify that these events are emitted correctly on blur and focus actions.
readonly nzBlur = output<void>();
components/input-number/input-number.component.ts:306
- The conditional logic has been inverted to emit nzFocus on a truthy 'origin' and nzBlur on a falsy 'origin'. Please confirm that this change accurately reflects the intended focus and blur behavior.
if (origin) {
|
在 v19 我们将旧版 NzInputNumberModule 标记为弃用,在 v20 之前我想我们需要使新版组件与旧版在能力上对齐,并且足够稳定,所以我将此 PR 放到 v19.3 milestone 中。 |
同意 |
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: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information