#33024: filter_horizontal doesn't use full height when in collapsed fieldset
-------------------------------------+-------------------------------------
Reporter: Peter | Owner: nobody
Tillema |
Type: | Status: new
Uncategorized |
Component: | Version: 3.2
contrib.admin | Keywords: filter_horizontal,
Severity: Normal | fieldsets, admin
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 1 |
-------------------------------------+-------------------------------------
Say you have a field `field` in model `X`, which is a `ManyToMany` field.
You can use `filter_horizontal` in the `ModelAdmin` to display the
available and selected options. However, if you use `filter_horizontal` in
combination with a fieldset which is collapsed by default, it won't take
the full height.
Example:
{{{
#!python
@admin.register(X)
class XAdmin(admin.ModelAdmin):
list_display = ('a', 'b', 'c', 'field')
filter_horizontal = ('field',)
fieldsets = (
(None, {
'fields': ('a', 'b', 'c')
}),
('Other', {
'classes': ('collapse',),
'fields': ('field',)
})
)
}}}
which gets rendered as https://i.imgur.com/jZpUHYN.png
--
Ticket URL: <https://code.djangoproject.com/ticket/33024>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/055.f8e69fec5a1b38b927e05de369bc0b22%40djangoproject.com.