Skip to content

Provide a way to set an initially active item in Layout's menuList #70

Open
@awareness481

Description

@awareness481

It would be great if we could have a property in menuList, to signify that the item should be active on the first render and should be passed down the .active class.
On subsequent renders this should have no effect.

example implementation:

const mainList = [
  {
    routerLink: RouterComponent,
    primary: "Overview",
    to: "/dashboard",
    icon: <DashboardIcon />,
  },
  {
    routerLink: RouterComponent,
    primary: "Shopping",
    to: "/dashboard",
    icon: <ShoppingCartIcon />,
    initiallyActive: true
  }
]

The List component code can be found here

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions