Skip to content

fix(module:tabs): nzLinkRouter not work for the first time#9118

Merged
HyperLife1119 merged 1 commit into
NG-ZORRO:masterfrom
Laffery:fix/tab-link-not-work-first-time
May 1, 2025
Merged

fix(module:tabs): nzLinkRouter not work for the first time#9118
HyperLife1119 merged 1 commit into
NG-ZORRO:masterfrom
Laffery:fix/tab-link-not-work-first-time

Conversation

@Laffery

@Laffery Laffery commented May 1, 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: close #9083

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@Laffery Laffery requested a review from hsuanxyz as a code owner May 1, 2025 00:48
@zorro-bot

zorro-bot Bot commented May 1, 2025

Copy link
Copy Markdown

This preview will be available after the AzureCI is passed.

)
.pipe(takeUntil(this.destroy$), startWith(true))
merge(this.router.events.pipe(filter(e => e instanceof NavigationEnd)), this.tabLinks.changes)
.pipe(delay(0), takeUntil(this.destroy$))

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.

delay(0) is necessary

@codecov

codecov Bot commented May 1, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.01%. Comparing base (2500821) to head (6d22560).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9118      +/-   ##
==========================================
- Coverage   92.01%   92.01%   -0.01%     
==========================================
  Files         565      565              
  Lines       20041    20040       -1     
  Branches     3006     3006              
==========================================
- Hits        18441    18440       -1     
  Misses       1261     1261              
  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.

@Laffery Laffery requested a review from HyperLife1119 May 1, 2025 00:54
),
this.tabLinks.changes
)
.pipe(takeUntil(this.destroy$), startWith(true))

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.

startWith(true) can be removed due to this.tabLinks.changes will emit an event anyway

@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 0f7f94d into NG-ZORRO:master May 1, 2025
9 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.

nz-tabset's nzLinkRouter not working properly when the app is built for production and it uses lazy-loaded routing modules

2 participants