Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tabs): resolve ghost tab selection when collection changes (#17049) #17365

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ANANTH4004
Copy link

fix(tabs): resolve ghost tab selection when collection changes (#17049)

Fixes an issue where the tab ink bar remains visible for a previously selected tab even after the underlying tab collection changes.

  • Ensured the ContentChildren query tracks changes to the p-tab components.
  • Added signal-based tracking for the number of tabs to update the ink bar dynamically.
  • Improved handling of tab rendering lifecycle to ensure consistency during dynamic updates.

Closes #17049.

Copy link

vercel bot commented Jan 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 3:37am
primeng-v18 ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 3:37am

Copy link

vercel bot commented Jan 13, 2025

@ANANTH4004 is attempting to deploy a commit to the primetek Team on Vercel.

A member of the Team first needs to authorize it.

@mertsincan mertsincan added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Jan 15, 2025
@mertsincan mertsincan added this to the 19.1.0 milestone Jan 15, 2025
@@ -89,10 +90,15 @@ export class TabList extends BaseComponent implements AfterViewInit, AfterConten

scrollable = computed(() => this.pcTabs.scrollable());

@ContentChildren(Tab, { descendants: true }) tab: QueryList<Tab>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be better to use the new contentChildren Signal. I think the tabCount then could simply be a computed signal.

Copy link

vercel bot commented Feb 22, 2025

Deployment failed with the following error:

Creating the Deployment Timed Out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
Status: Review
Development

Successfully merging this pull request may close these issues.

Tabs (v18): Ghost tab selection remains when underlying collection changes
3 participants