Skip to content

Commit

Permalink
feat(blocks): update block InputSelect #18 fix issue with selected …
Browse files Browse the repository at this point in the history
…item state
  • Loading branch information
Awilum committed May 22, 2021
1 parent 1c3fc79 commit 0af38a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blocks/blocks/InputSelect/block.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
{% endif %}

{% for key, value in items %}
<option value="{{ key }}" {% if key == attr.value(block.properties.name, values, block.properties.value) %} selected="selected" {% endif %}>{{ include(template_from_string(value)) }}</option>
<option value="{{ key }}"
{{ attr.selected(key, properties.name, values, properties.value) }}>{{ include(template_from_string(value)) }}</option>
{% endfor %}
</select>
{% if block.properties.help %}
Expand Down

0 comments on commit 0af38a3

Please sign in to comment.