{% load common_extras %}{% comment %} Reusable styled select dropdown — see the `ui_select` inclusion tag docstring in apps/common/templatetags/common_extras.py. Bind `model` to a property in the ENCLOSING x-data scope (an array when `multiple`, otherwise a string). Expressions that reference `model` live in Alpine DIRECTIVES (x-text / :class / @click / x-model / @change), which resolve through the scope chain — NOT in the x-data methods below, whose plain-JS bodies cannot see the parent scope. That is why uiLabel() takes the value as an argument instead of reading it. Moving that logic "inline" to tidy it up silently breaks every call site. The panel is position:fixed and anchored on open, because the filter toolbars it lives in scroll horizontally: an absolutely-positioned panel is clipped by that overflow. Fixed escapes the clipping context at the cost of manual anchoring, and since the coordinates are captured once, scrolling closes it rather than letting it drift. Deviation 5: the trigger styles (.bb-filter-select / .bb-filter-icon) are in apps/theme/static_src/src/styles.css. Studio keeps them inline in templates/calendar/calendar.html, so the shared component is unstyled on every page except that one. {% endcomment %}
{% include "components/_filter_icon.html" with name=icon %}
{% for opt in options %} {% if multiple %} {% else %} {% endif %} {% endfor %}