import React from 'react'; import { Nav, NavItem, NavList, Menu, MenuContent, MenuList, MenuItem } from '@patternfly/react-core'; export const NavFlyout: React.FunctionComponent = () => { const [activeItem, setActiveItem] = React.useState('nav-flyout-default-link-1'); const onSelect = (event: React.FormEvent, result: { itemId: number | string }) => { setActiveItem(result.itemId as string); }; const onMenuSelect = (_event: any, itemId: string | number | undefined) => setActiveItem(itemId as string); const onMenuItemClick = (event: any) => { event.preventDefault(); }; const numFlyouts = 5; const FlyoutMenu = ({ depth, children }) => ( Next menu {Array.from({ length: numFlyouts - depth }).map((_value, index) => ( Menu {depth} item {index} ))} Next menu ); let curFlyout = {null}; for (let i = 2; i < numFlyouts - 1; i++) { curFlyout = {curFlyout}; } return (
); };