Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset menu on close #26

Open
bmauger opened this issue Sep 30, 2019 · 1 comment
Open

Reset menu on close #26

bmauger opened this issue Sep 30, 2019 · 1 comment

Comments

@bmauger
Copy link

bmauger commented Sep 30, 2019

Hello! Great menu, thank you! By default, you have options to go back one menu level or to close the menu completely. Is it possible if, for example, you are four levels deep and you close the menu, it would be reset to the first level the next time you open it?

@stuseek
Copy link

stuseek commented Mar 9, 2020

I use such approach to do that

this.menuElement.addEventListener('sm.close-after', () => {
    this.menu.navigateTo(this.menuElement.querySelectorAll('ul')[0])
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants