MCPcopy
hub / github.com/reactjs/react-tabs / getFirstTab

Function getFirstTab

src/components/UncontrolledTabs.jsx:135–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133 }
134
135 function getFirstTab() {
136 const count = getTabsCount();
137
138 // Look for non disabled tab from the first tab
139 for (let i = 0; i < count; i++) {
140 if (!isTabDisabled(getTab(i))) {
141 return i;
142 }
143 }
144
145 /* istanbul ignore next */
146 return null;
147 }
148
149 function getLastTab() {
150 let i = getTabsCount();

Callers 1

handleKeyDownFunction · 0.85

Calls 3

getTabsCountFunction · 0.90
isTabDisabledFunction · 0.85
getTabFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…