Hey guys!
How would you increment a variable on the front end in a repeater?
I have a variable named total_price that I would like to increment with the price of each article in the repeat. I would prefer not using the DB query for that:
<div class="row" is="dmx-repeat" id="repeat1" dmx-bind:repeat="dt_booking.data.products">
<div class="row">
<div class="col w-75">{{name}}</div>
<div class="col w-75">{{quantity}} jour(s)</div>
<div class="col text-end">{{price.formatCurrency('€', '.', ',', 2)}}</div>
<div class="col text-end">
<button id="btn_delete_booking_product" class="btn btn-sm" dmx-on:click="dt_booking_product.select(id)" data-bs-toggle="modal" data-bs-target="#modal_delete_product"><i class="far fa-trash-alt"></i></button>
{{ something like: total_price += price }}
</div>
</div>
</div>
Thank you!