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

Routing Callback #161

Open
trafnar opened this issue Nov 6, 2020 · 1 comment
Open

Routing Callback #161

trafnar opened this issue Nov 6, 2020 · 1 comment

Comments

@trafnar
Copy link
Contributor

trafnar commented Nov 6, 2020

In order to make the documentation menu animate correctly, I think I need to know when a new route is being navigated to. Is there a way to trigger an event in this case that can be responded to by the other nav items?

Here's what happens:

  • when a section is expanded, the height of the child section is calculated so that it can be animated to (CSS won't animate to 'auto' height).
  • when the animation is finished, I will set it back to 'auto' in order to accommodate changes inside it which change its height.
  • when another menu item is navigated to, that may cause the current section to collapse, which means the height needs to be set back to a number, instead of auto but I don't know how to hook up an event in that scenario.
@trafnar
Copy link
Contributor Author

trafnar commented Nov 6, 2020

ref #160

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

1 participant