{% with id=widget.attrs.id %}{% if widget.search_url %} { const inp = this.$root.querySelector('input[type=hidden]'); if (inp) inp.dispatchEvent(new Event('change', {bubbles: true})); }); }, pick(val, lbl, ic) { this.value = val; this.label = lbl; this.icon = ic || ''; this.search = ''; this._v++; this.$root.open = false; this._notify(); }, clear() { this.value = ''; this.label = ''; this.icon = ''; this.search = ''; this._v++; this._notify(); } }" @toggle="if ($el.open) $nextTick(() => $refs.search.focus())"> {% if widget.selected_label %}{{ widget.selected_label }}{% else %}Select…{% endif %} {% else %} s.textContent.trim().toLowerCase().includes(q) ); }, get displayText() { this._v; return this.label || ''; }, _notify() { this.$nextTick(() => { const inp = this.$root.querySelector('input[type=hidden]'); if (inp) inp.dispatchEvent(new Event('change', {bubbles: true})); }); }, pick(val, lbl, ic) { this.value = val; this.label = lbl; this.icon = ic || ''; this.search = ''; this._v++; this.$root.open = false; this._notify(); }, clear() { this.value = ''; this.label = ''; this.icon = ''; this.search = ''; this._v++; this._notify(); } }" @toggle="if ($el.open) $nextTick(() => $refs.search.focus())"> {% if widget.selected_label %}{{ widget.selected_label }}{% else %}Select…{% endif %} {% for group, options, index in widget.optgroups %}{% if group %}{{ group }}{% endif %}{% for option in options %}{% if option.value != "" %} ✓{% if option.icon %}{{ option.icon|safe }}{% endif %}{{ option.label }}{% if option.description %}{{ option.description }}{% endif %} {% endif %}{% endfor %}{% endfor %} No results {% endif %}{% endwith %}
No results