Skip to content

feat(module:tabs): support destroyInactiveTabPane input#8845

Merged
Laffery merged 1 commit intoNG-ZORRO:masterfrom
HyperLife1119:feat/tab-destroyInactiveTabPane
Oct 22, 2024
Merged

feat(module:tabs): support destroyInactiveTabPane input#8845
Laffery merged 1 commit intoNG-ZORRO:masterfrom
HyperLife1119:feat/tab-destroyInactiveTabPane

Conversation

@HyperLife1119
Copy link
Copy Markdown
Collaborator

@HyperLife1119 HyperLife1119 commented Oct 22, 2024

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: #8591

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@zorro-bot
Copy link
Copy Markdown

zorro-bot bot commented Oct 22, 2024

This preview will be available after the AzureCI is passed.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.93%. Comparing base (a48979f) to head (d61915a).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8845   +/-   ##
=======================================
  Coverage   91.93%   91.93%           
=======================================
  Files         536      537    +1     
  Lines       18455    18456    +1     
  Branches     2816     2816           
=======================================
+ Hits        16967    16968    +1     
  Misses       1183     1183           
  Partials      305      305           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

it('should load content on first change detection pass', () => {
fixture.detectChanges();
expect(element.querySelectorAll('.ant-tabs-tabpane')[1]!.textContent).toContain(`Content of Tab Pane 1`);
expect(element.querySelectorAll('.ant-tabs-tabpane')[0]!.textContent).toContain(`Content of Tab Pane 1`);
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.

默认情况下只会渲染当前激活或曾经激活过的 tab,由于这里是第一次渲染,所以仅会渲染一个 tab,因此将 index 改为 0

@HyperLife1119 HyperLife1119 force-pushed the feat/tab-destroyInactiveTabPane branch from d61915a to 104d621 Compare October 22, 2024 02:08
Copy link
Copy Markdown
Collaborator

@Laffery Laffery left a comment

Choose a reason for hiding this comment

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

LGTM

@Laffery Laffery merged commit 0de6d62 into NG-ZORRO:master Oct 22, 2024
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.

Destroy inactive lazy loaded nz-tab

2 participants