Wappler Version : 6.2.1 BETA
Operating System :
Server Model:
Database Type:
Hosting Type:
Expected behavior
A select element using dynamic options using a repeat should be functional
Actual behavior
The select always shows the first option
Screen Recording 2024-02-21 at 7.45.08 AM
How to reproduce
The following select will always display the value for “1” regardless of its bound value, and will not change after making a selection.
<select dmx-bind:id="inp_servings_block_partial_{{$index}}" dmx-bind:data-meal_block_id="this_meal_block_mobile.value.meal_block_id" id="inp_servings_block_partial" class="select-css serving_block_select" name="servings_block2" dmx-bind:value="this_meal_block_mobile.value.servings" dmx-on:click.stop.prevent="run({condition:{if:`!edit_mode.value`,then:{steps:{run:{action:`modal_copy_plan.show()`}}}}})">
<option value="1">1 <%=_('translations.serving')%></option>
<option dmx-bind:value="$value+1" dmx-repeat:each_serving_option="49">{{$value+1}} <%=_('translations.servings')%></option>
</select>
Here is a stripped down version that exhibits the issue:
<select dmx-bind:id="inp_servings_block_partial_{{$index}}" id="inp_servings_block_partial" class="select-css serving_block_select" name="servings_block2" dmx-bind:value="this_meal_block_mobile.value.servings">
<option value="1">1 serving</option>
<option dmx-bind:value="$value+1" dmx-repeat:each_serving_option="49">{{$value+1}} servings</option>
</select>
The options are there, but it always reverts to the first option. If I remove the stating “1 serving” is then always sets the select to “2”.