Skip to content

fix(tabs): name the missing tab in the getTab error - #31832

Open
thetaPC wants to merge 2 commits into
mainfrom
FW-8014
Open

thetaPC wants to merge 2 commits into
mainfrom
FW-8014

Conversation

@thetaPC

@thetaPC thetaPC commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Issue number: internal


What is the current behavior?

  • When select() or getTab() on ion-tabs is given a tab that doesn't exist, the error reads Tab with id: "undefined" does not exist, because it prints the failed lookup result instead of the requested tab.
  • The docs for select(), getTab() and getSelected() say these methods are only available for vanilla JavaScript. React and Vue tabs used without a router outlet are built on core ion-tabs, so the methods work there too.

What is the new behavior?

  • The error names the requested tab, e.g. Tab with id: "settings" does not exist.
  • The docs for the three methods say that in React and Vue they only work when tabs are used without a router outlet. With a router outlet, select() points to router navigation instead.
  • Adds a spec test for the error message.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Angular isn't mentioned in the new docs because it replaces core ion-tabs with its own component, which has its own select() and getSelected().

Pairs with ionic-team/ionic-docs#4904

@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-framework Ready Ready Preview Nov 26, 2026 12:42am UTC

Request Review

@thetaPC
thetaPC marked this pull request as ready for review November 26, 2026 01:36
@thetaPC
thetaPC requested a review from a team as a code owner November 26, 2026 01:36
@thetaPC
thetaPC requested a review from ShaneK November 26, 2026 01:36

This branch was successfully deployed

1 active deployment
Preview — e3f6907e Deployed Nov 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant