MCPcopy Index your code
hub / github.com/adobe/react-spectrum / getTabpanels

Method getTabpanels

packages/@react-aria/test-utils/src/tabs.ts:170–181  ·  view source on GitHub ↗

* Returns the tabpanels.

()

Source from the content-addressed store, hash-verified

168 * Returns the tabpanels.
169 */
170 getTabpanels(): HTMLElement[] {
171 let tabpanels = [] as HTMLElement[];
172 for (let tab of this.getTabs()) {
173 let controlId = tab.getAttribute('aria-controls');
174 let panel = controlId != null ? document.getElementById(controlId) : null;
175 if (panel != null) {
176 tabpanels.push(panel);
177 }
178 }
179
180 return tabpanels;
181 }
182
183 /**
184 * Returns the tabs in the tablist.

Callers 2

Tabs.test.jsFile · 0.80
Tabs.test.jsFile · 0.80

Calls 2

getTabsMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected