-
Notifications
You must be signed in to change notification settings - Fork 301
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Unfold are you using?
main
What version of Django are you using?
5.1
What browser are you using?
Firefox 135.0
Did you checked changelog/commit history, if the bug is not already fixed?
Yes
Did you searched other issues, if the bug is not already fixed?
Yes
Did you checked documentation?
Yes
Are you able to replicate the bug in the demo site?
No, I could not find MultipleDropdownFilter or MultipleRelatedDropdownFilter on demo site.
Repository with reproduced bug
No
Describe your issue
Suppose we have an admin class like below.
@admin.register(SampleModel)
class SampleModelAdmin(ModelAdmin):
list_filter = [
("status", MultipleDropdownFilter),
("owner", MultipleRelatedDropdownFilter),
("writer", MultipleRelatedDropdownFilter),
]- Go to change_list page.
- Choose some filters and apply. Then let's say, current URL after filtering is
/admin/app/model/?status=open&status=closed&owner__id__exact=1&owner__id__exact=2&owner__id__exact=3&writer__id__exact=5 - Write 'test' to search form & click enter. Current URL after search is
/admin/app/model/?q=test&status=open&owner__id__exact=1&writer__id__exact=5 - So,
status=closedandowner__id__exact=2&owner__id__exact=3filters get lost.
While just filtering (not searching), there is no problem like this one. But filter a field with multiple values then searching breaks query string & filters.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working