Skip to content

fix(module:result): nz-result-icon in ng-content does not work - #9511

Merged
HyperLife1119 merged 2 commits into
NG-ZORRO:masterfrom
Laffery:fix/result-custom-icon
Nov 11, 2025
Merged

HyperLife1119 merged 2 commits into
NG-ZORRO:masterfrom
Laffery:fix/result-custom-icon

Conversation

@Laffery

@Laffery Laffery commented Nov 9, 2025

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

: icon
: this.isException
? undefined
: IconMap[this.nzStatus as NzResultIconType];

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

When nzIcon is undefined, the icon will be IconMap[this.nzStatus as NzResultIconType], which makes the icon always be truthy and the nz-result-icon is defined in the ng-content will not work forever

@codecov

codecov Bot commented Nov 9, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.41379% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.06%. Comparing base (18b5f18) to head (904cdf6).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
components/result/result.component.ts 72.41% 0 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9511      +/-   ##
==========================================
- Coverage   90.11%   90.06%   -0.05%     
==========================================
  Files         570      570              
  Lines       23382    23379       -3     
  Branches     4644     4650       +6     
==========================================
- Hits        21070    21057      -13     
- Misses       1606     1614       +8     
- Partials      706      708       +2     

☔ 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.

Comment thread components/result/result-cells.ts Outdated

@HyperLife1119 HyperLife1119 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

@HyperLife1119
HyperLife1119 merged commit 0e095a1 into NG-ZORRO:master Nov 11, 2025
7 of 10 checks passed
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.

2 participants