laravel-enso/core

Make router push expand corresponding menu item

jlsjonas opened this issue · 2 comments

This is a feature request.

Prerequisites

  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you check the documentation?
  • Did you perform a cursory search?

Description

I'd suggest making the menu expand when a router.push (, router-link or similar event) gets triggered.

Steps to Reproduce

  1. add a router.push to an existing route somewhere
  2. click on it (with related menu collapsed)

Expected behavior

menu to expand, highlighting the active item

Actual behavior

menu stays collapsed, hiding the active element

Example Use Case

Dashboard links to certain pages

Note that this.checkActiveChildren(this.menus); is responsible for the expansion upon pageload. calling it (via debug) does match expected behavior highlighted above

As a plus now it also auto collapses expanded menu with no selection