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

Tab Highlighting Not Working with Dynamic URLs in UNFOLD Settings #834

Open
Andy183 opened this issue Nov 2, 2024 · 2 comments
Open

Tab Highlighting Not Working with Dynamic URLs in UNFOLD Settings #834

Andy183 opened this issue Nov 2, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Andy183
Copy link

Andy183 commented Nov 2, 2024

When using dynamic URLs in the UNFOLD "TABS" settings configuration, the active tab is not being highlighted correctly. The tab highlighting doesn't work when navigating between different filtered views of the same model.

Current Configuration:

"TABS": [
    {
        "models": [
            "website_app.enquiry",
        ],
        "items": [
            {
                "title": _("All Leads"),
                "link": reverse_lazy("admin:website_app_enquiry_changelist"),
            },
            {
                "title": _("No Assigner"),
                "link": lambda request: str(
                    reverse_lazy("admin:website_app_enquiry_changelist")) + "?assigner__exact=No+Assigner",
            },
        ]
    }
]

What version of Unfold are you using?

0.4

What version of Django are you using?

Django 4.2

What browser are you using?

Chrome

@Ehco1996
Copy link

Ehco1996 commented Nov 4, 2024

i draft an pr for this #811

@Andy183
Copy link
Author

Andy183 commented Nov 5, 2024

i draft an pr for this #811

I got it. Thanks man, You're awesome

@lukasvinclav lukasvinclav added the enhancement New feature or request label Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants