How to use the @mui-treasury/utils.mapNestedPath function in @mui-treasury/utils

To help you get started, we’ve selected a few @mui-treasury/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github siriwatknp / mui-treasury / website / src / containers / Demo / DemoPage.js View on Github external
getOpenKeys={({ menus, lastPath }) => {
        const keyMap = mapNestedPath(menus);
        return menus
          .filter(({ key }) => keyMap[key].includes(lastPath))
          .map(({ key }) => key);
      }}
    >
github siriwatknp / mui-treasury / packages / mui-components / src / menuList / nested / NestedMenuList.js View on Github external
  const keyMap = React.useMemo(() => mapNestedPath(menus), [menus]);
  const [iSelectedKey, setSelectedKey] = useStateBinding(selectedKey, '');
github siriwatknp / mui-treasury / website / src / modules / path / Path.js View on Github external
getOpenKeys: ({ menus, lastPath }) => {
      const keyMap = mapNestedPath(menus);
      return menus
        .filter(({ key }) => keyMap[key].includes(lastPath))
        .map(({ key }) => key);
    },
  };