MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / getTab

Function getTab

core/src/components/tabs/tabs.tsx:232–239  ·  view source on GitHub ↗
(tabs: HTMLIonTabElement[], tab: string | HTMLIonTabElement)

Source from the content-addressed store, hash-verified

230}
231
232const getTab = (tabs: HTMLIonTabElement[], tab: string | HTMLIonTabElement): HTMLIonTabElement | undefined => {
233 const tabEl = typeof tab === 'string' ? tabs.find((t) => t.tab === tab) : tab;
234
235 if (!tabEl) {
236 printIonError(`[ion-tabs] - Tab with id: "${tabEl}" does not exist`);
237 }
238 return tabEl;
239};

Callers 3

selectMethod · 0.85
getTabMethod · 0.85
setRouteIdMethod · 0.85

Calls 1

printIonErrorFunction · 0.90

Tested by

no test coverage detected