wagtail-nest / wagtail-modeladmin

Add any model in your project to the Wagtail admin. Formerly wagtail.contrib.modeladmin.
Other
21 stars 8 forks source link

Collapsible filter [ModelAdmin] #13

Open sourenaraya opened 7 years ago

sourenaraya commented 7 years ago

For example, i have Product model, and Vendor model. And of course, i want to filter Products by Vendor, on ProductAdmin page, It's ok when you have like, 10 vendors, but when there is 100 of them, its a problem. Especially on mobile devices. Would be nice, if filter by section was collapsed by default, just like in django admin.

ababic commented 7 years ago

Hi @sourenaraya.

If you wanted a workaround for the meantime, last time I checked, Wagtail's modeladmin app supported custom Django filters in list_filter, just like Django's equivalent does ( https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter), so you could try giving that a go?

This behaviour isn't documented though, so best to use with caution.