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

Function setSelected

src/components/UncontrolledTabs.jsx:80–88  ·  view source on GitHub ↗
(index, event)

Source from the content-addressed store, hash-verified

78 const ref = useRef();
79
80 function setSelected(index, event) {
81 // Check index boundary
82 if (index < 0 || index >= getTabsCount()) return;
83
84 const { onSelect, selectedIndex } = props;
85
86 // Call change event handler
87 onSelect(index, selectedIndex, event);
88 }
89
90 function getNextTab(index) {
91 const count = getTabsCount();

Callers 2

handleKeyDownFunction · 0.85
handleClickFunction · 0.85

Calls 2

getTabsCountFunction · 0.90
onSelectFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…