Skip to content

Allow filtering on enum ListField#781

Open
snow-born wants to merge 3 commits into
jowilf:mainfrom
snow-born:enumlist_filter
Open

Allow filtering on enum ListField#781
snow-born wants to merge 3 commits into
jowilf:mainfrom
snow-born:enumlist_filter

Conversation

@snow-born

@snow-born snow-born commented Jun 29, 2026

Copy link
Copy Markdown

Related

– Builds on: #746

Summary

This PR adapts the multiple choice behaviour of EnumField by testing with contains, so that combinations of options from the enum are available for filtering.

Changes

New Features

  • Use datatables array operators contains and without to allow filtering of enum-type ListField columns.

Modified Files

  • starlette_admin/statics/js/list.js — Use the encapsulated EnumField within the ListField. Add new enumArrayCondition and share code between this and extant enumCondition.
  • starlette_admin/templates/list.html — Bump v=3 to v=4 for js/list.js src path.

Usage

Filter an enum ListField using the array operators contains and without.

image

Testing

Manual verification of ListField, EnumField and enum ListField.

@snow-born snow-born changed the title Enumlist filter Allow filtering on enum ListField Jun 29, 2026
@snow-born snow-born marked this pull request as draft June 29, 2026 15:34
@snow-born snow-born marked this pull request as ready for review June 29, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant