
{# Single dynamic param: it can be different types of inputs #}
{# It can be included from forms or tables. #}

{# PARAMS:  #}
{#     param: the param dict. #}
{#     value: the value of this param #}
{#     data_key: the key that will be used to store this value. #}
{#     row_values: defined if used in a table with all values for that row #}

{% set classStr = 'selectpicker show-tick' if selectpicker else '' %}
<select class="{{ classStr }}" data-width="auto"  title="None"  data-live-search="true" {{ data_key }}  data-dropup-auto="true">

    {% for puck in storage.pucks() %}
        {% set selected = 'selected' if value|default(0)|int == puck['id'] else '' %}
         <option value="{{ puck['id'] }}" {{ selected }}>{{ puck['label'] }}</option>
    {% endfor %}

</select>


