Add a shared searchable multiselect combobox for team/member pickers

Extracts the "Grant role" member picker's typeahead combobox into a
reusable static/js/searchable-select.js (opt in via data-searchable on
the widget), and reuses it for the news form's teams field -- a proper
multiselect with removable pills and filter-as-you-type, replacing the
plain checkbox list. Needed forwarding widget attrs through the shared
select template, which never passed them to the rendered <select>.
This commit is contained in:
2026-08-03 21:36:35 +02:00
parent 38947196c1
commit d9b4337319
6 changed files with 181 additions and 92 deletions

View File

@@ -59,6 +59,7 @@
name="{{ field.html_name }}"
id="{{ field.auto_id }}"
{% if field.widget_type == "selectmultiple" %}multiple{% endif %}
{% for attr, value in field.field.widget.attrs.items %}{{ attr }}="{{ value }}" {% endfor %}
>
{% if field.widget_type == "selectmultiple" %}