Skip to content

feat(module:input-number): add nzBlur and nzFocus outputs#9098

Merged
Laffery merged 1 commit into
NG-ZORRO:masterfrom
HyperLife1119:feat/input-number-event
Apr 30, 2025
Merged

feat(module:input-number): add nzBlur and nzFocus outputs#9098
Laffery merged 1 commit into
NG-ZORRO:masterfrom
HyperLife1119:feat/input-number-event

Conversation

@HyperLife1119

Copy link
Copy Markdown
Collaborator

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Application (the showcase website) / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@zorro-bot

zorro-bot Bot commented Apr 19, 2025

Copy link
Copy Markdown

This preview will be available after the AzureCI is passed.

@codecov

codecov Bot commented Apr 19, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.00%. Comparing base (1c1c3e4) to head (f06956a).
Report is 6 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@HyperLife1119 HyperLife1119 requested review from Laffery and Copilot and removed request for vthinkxie April 19, 2025 07:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {

@Nicoss54 Nicoss54 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Laffery Laffery left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Laffery Laffery added this to the v19.3 milestone Apr 30, 2025
@Laffery

Laffery commented Apr 30, 2025

Copy link
Copy Markdown
Collaborator

在 v19 我们将旧版 NzInputNumberModule 标记为弃用,在 v20 之前我想我们需要使新版组件与旧版在能力上对齐,并且足够稳定,所以我将此 PR 放到 v19.3 milestone 中。
另外,我认为需要给足够的时间使其完全迁移,旧版组件我建议在 v21 中移除。
@HyperLife1119 WDYT

@HyperLife1119

Copy link
Copy Markdown
Collaborator Author

在 v19 我们将旧版 NzInputNumberModule 标记为弃用,在 v20 之前我想我们需要使新版组件与旧版在能力上对齐,并且足够稳定,所以我将此 PR 放到 v19.3 milestone 中。 另外,我认为需要给足够的时间使其完全迁移,旧版组件我建议在 v21 中移除。 @HyperLife1119 WDYT

同意

@Laffery Laffery merged commit 1b1a013 into NG-ZORRO:master Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NzInputNumberComponent doesn't have nzFocus, nzBlur output events [nz-input-number]:add nzBlur property

4 participants