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

Function getLastTab

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

Source from the content-addressed store, hash-verified

147 }
148
149 function getLastTab() {
150 let i = getTabsCount();
151
152 // Look for non disabled tab from the last tab
153 while (i--) {
154 if (!isTabDisabled(getTab(i))) {
155 return i;
156 }
157 }
158
159 /* istanbul ignore next */
160 return null;
161 }
162
163 function getTabsCount() {
164 const { children } = props;

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…