Strange behavious on table repeat

wapper 3.4.1 docker, php, windows 10

Hi,

I seem to be getting a strange bug I cant explain. I basically have a repeater table that displays a bunch of rows and in each row is checkbox that if ticked does a SC update.

The SC side all works, if i tick the chekbox it DOES update the DB and if I tick it again it does the update, so it sets a cell to 0 or 1.

But, I cannot get the checkbox to reflect the cheked status, but I know the data returned is correct.

So my code is:

 <form id="loaded{{id}}">
	<input type="checkbox" value="1" id="loaded{{id}}" name="loaded" dmx-bind:checked="loaded" dmx-on:changed="sc_JobItem_upd.load({id: id, loaded: loaded == 0 ? 1 : 0})">
</form>
<p>loaded cell value: {{loaded}}

so you can see if have the checked value to use the table repeat {{loaded}} - and, to be sure I am getting the right value I display that outside the checkbox.

1

but the checkbox is not checked even though you can see it returns “1” I tried using toNumber() but then I get no value.

Stumped, sure I have done something stupid again. My ternary bit all works lovely doing the update and then I reload the SC to refresh teh table data, but i never get the checkbox checked

Thanks

Community Page
Last updated: