SMall tweaks to the new dropdown.

This commit is contained in:
Yaro Kasear 2025-10-22 12:30:57 -05:00
parent 5718deee6b
commit 5234cbdd61
2 changed files with 5 additions and 1 deletions

View file

@ -1,4 +1,4 @@
.inventory-dropdown { .inventory-dropdown {
border-color: rgb(222, 226, 230); border-color: rgb(222, 226, 230) !important;
overflow-y: auto; overflow-y: auto;
} }

View file

@ -28,6 +28,7 @@
{% endif %} {% endif %}
</select> </select>
#} #}
{% if options %}
{% if value %} {% if value %}
{% set sel_label = (options | selectattr('value', 'equalto', value) | first)['label'] %} {% set sel_label = (options | selectattr('value', 'equalto', value) | first)['label'] %}
{% else %} {% else %}
@ -43,6 +44,9 @@
data-value="{{ opt['value'] }}" onclick="DropDown.utilities.selectItem('{{ field_name }}', '{{ opt['value'] }}')" id="{{ field_name }}-{{ opt['value'] }}">{{ opt['label'] }}</a></li> data-value="{{ opt['value'] }}" onclick="DropDown.utilities.selectItem('{{ field_name }}', '{{ opt['value'] }}')" id="{{ field_name }}-{{ opt['value'] }}">{{ opt['label'] }}</a></li>
{% endfor %} {% endfor %}
</div> </div>
{% else %}
<button class="btn btn-outline-dark d-block w-100 text-start dropdown-toggle disabled inventory-dropdown" disabled>-- No selection available --</button>
{% endif %}
<input type="hidden" name="{{ field_name }}" id="{{ field_name }}" value="{{ value }}"> <input type="hidden" name="{{ field_name }}" id="{{ field_name }}" value="{{ value }}">
{% elif field_type == 'textarea' %} {% elif field_type == 'textarea' %}