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:
@@ -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" %}
|
||||
|
||||
Reference in New Issue
Block a user