django-unfold
django-unfold copied to clipboard
Enhance Tab Functionality for URL Query-Based Field Filtering
Summary:
This PR introduces improvements to the tab functionality, allowing tabs to serve as quick filters for field data based on URL query parameters. The current logic does not handle this scenario correctly, leading to incorrect filtering results.
Example:
Currently, the tabs are structured as follows:
tabs = [
{
"models": [
"group1",
],
"items": [
{"title": "group-1", "link": "/admin/app_name/group/"},
{"title": "group--2", "link": "/admin/app_name/group/?lable=online"},
],
},
]
This PR addresses the issue by implementing a more robust logic to correctly interpret and apply the URL query parameters for filtering.