yaminncco / vue-sidebar-menu

A Vue.js Sidebar Menu Component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Children always stay open for the first menu item with collapsed: false option

amrityam opened this issue · comments

With collapsed: false option, if I add child option to first menu item, by default it always stays open.
But with collapsed: true , it works perfectly.
Tested with 4.8.1 version.

menu: [
{
header: true,
title: "Getting Started",
},

    {
      href: "/",
      title: "Dropdown Page",
      icon: "fa fa-list-ul",
      child: [
        {
          href: "/page/sub-page-1",
          title: "Sub Page 01",
          icon: "fa fa-file-alt",
        },
        {
          href: "/page/sub-page-2",
          title: "Sub Page 02",
          icon: "fa fa-file-alt",
        },
      ],
    },
  ],
  collapsed: false,

Child menu will auto expand when the route is active.

I agree with you its for better user experience. Is there any option we can control this behavior?

Sorry, no plan to add this