The multiselect field is supposed to update the array on selection. This works for a normal multiselect, but when using Select2 I have to set a value in another field before the dmx-on:updated fires and sets the array_subtotal. Anyone know who to get it to work on selection?
Here's the code for the Select field. The class="select2" is used to trigger the Select2 script.
<select id="inp_type" class="form-control select2" multiple="multiple" dmx-bind:options="getProjectTypes.data.getProjectTypes" optiontext="name" optionvalue="regular_price" name="inp_type" dmx-on:updated="array_subtotal.empty();array_subtotal.add(value.sum())"> </select>
Here is the bottom input in the video that is bound to array_subtotal
<input id="cost" name="cost" class="form-control" readonly="true" dmx-bind:value="array_subtotal.items">