MCPcopy Index your code
hub / github.com/reactstrap/reactstrap / getMenuItems

Method getMenuItems

src/Dropdown.js:271–279  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

269 }
270
271 getMenuItems() {
272 // In a real menu with a child DropdownMenu, `this.getMenu()` should never
273 // be null, but it is sometimes null in tests. To mitigate that, we just
274 // use `this.getContainer()` as the fallback `menuContainer`.
275 const menuContainer = this.getMenu() || this.getContainer();
276 return [].slice.call(
277 menuContainer.querySelectorAll(`[role="${this.getItemType()}"]`),
278 );
279 }
280
281 addEvents() {
282 ['click', 'touchstart', 'keyup'].forEach((event) =>

Callers 1

handleKeyDownMethod · 0.95

Calls 3

getMenuMethod · 0.95
getContainerMethod · 0.95
getItemTypeMethod · 0.95

Tested by

no test coverage detected