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

Active item matching not correct for nested paths #67

Open
joshuadavidthomas opened this issue Apr 9, 2024 · 2 comments
Open

Active item matching not correct for nested paths #67

joshuadavidthomas opened this issue Apr 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@joshuadavidthomas
Copy link
Member

I have a nav with two items defined:

  • /leases/
  • /leases/add/

If I navigate to the second one, both are marked as active.

image

@joshuadavidthomas joshuadavidthomas added the bug Something isn't working label Apr 9, 2024
@joshuadavidthomas
Copy link
Member Author

joshuadavidthomas commented Apr 9, 2024

Also, this app has react client side navigation that does not add a trailing slash. I tend to prefer the trailing slash and use Django's default behavior of adding one, but I'm finding it useful in this app for debugging purposes to differentiate between a client or server side navigation on whether the url has the trailing slash or not. The active property is not applied if the trailing slash is missing:

image

@joshuadavidthomas
Copy link
Member Author

On second thought, the client side navigation may not have anything to do with the active matching. Since the nav is rendered server side any client side navigation doesn't really affect the template since it's already been rendered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant