Skip to content

Commit

Permalink
Merge pull request #143 from Ballsdex-Team/fix-not-selected-item
Browse files Browse the repository at this point in the history
Fix menus not pre-selecting current value
  • Loading branch information
long2ice committed Jul 27, 2023
2 parents 5059133 + 123c9cd commit 309686f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fastapi_admin/templates/widgets/inputs/select.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% with id = 'form-select-' + name %}
<div class="form-group mb-3">
<div class="form-label">{{ label }}</div>
<select class="form-select" name="{{ name }}" id="{{ id }}">
<select class="form-select" autocomplete="off" name="{{ name }}" id="{{ id }}">
{% for option in options %}
<option value="{{ option[1] }}" {% if option[0] == value %}
<option value="{{ option[1] }}" {% if option[1] == value %}
selected
{% endif %} >{{ option[0] }}</option>
{% endfor %}
Expand Down

0 comments on commit 309686f

Please sign in to comment.