Skip to content

Conversation

DRiFTy17
Copy link
Collaborator

@DRiFTy17 DRiFTy17 commented Aug 1, 2025

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added/updated: N
  • Docs have been added/updated: N
  • Does this PR introduce a breaking change? N
  • I have linked any related GitHub issues to be closed when this PR is merged? N

Describe the new behavior?

Rather than storing a reference to the <forge-tab> element instances within the <forge-tab-bar>, this change swaps that out for just querying the DOM for the current child tabs at any given time when needed. This avoids any race conditions and ensures we're aways acting upon the latest DOM state, while also avoiding capturing element references which can cause memory leaks.

Additional information

This was caused by the slotchange listener getting added after the component initializes and the DOM is rendered, which meant the internal tab references were empty.

@DRiFTy17 DRiFTy17 requested a review from Ross-Blakeney August 1, 2025 20:07
@DRiFTy17 DRiFTy17 requested a review from a team as a code owner August 1, 2025 20:07
@DRiFTy17 DRiFTy17 added the patch Increment the patch version when merged label Aug 1, 2025
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@DRiFTy17 DRiFTy17 merged commit a03eab0 into main Aug 1, 2025
13 checks passed
@DRiFTy17 DRiFTy17 deleted the fix/tab-bar-active-tab-sync branch August 1, 2025 20:14
Copy link
Contributor

github-actions bot commented Aug 1, 2025

🚀 PR was released in v3.10.4 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants