One cell has the Property of Data Item in Repeat, the other cell a Primitives Checkbox. When we preview the app in a browser or using the Apple app the Checkbox doesn’t function i.e. nothing happens when it’s clicked. We’ve tried switching the Checkbox for other Primitives and the Toggle also doesn’t work. The Dropdown and Slider do appear to function.
I am watching a tutorial in which the tutor creates a container in which he uses a checkbox and other text elements. The text elements are connected to data from the database. The whole container is repeated. The checkbox should be used as input to update the status processed or done. So when I link the checkbox to my database, the checkbox cannot be tapped. It seems that as soon as the checkbox is repeated in a list, it just doesn’t work as input anymore.
With the tutor it works without linking to any variable.
So is this a bug or am I doing something wrong?
What’s the tutorial you’re following? Simply checking or unchecking a checkbox will never change the value in the database. You need additional logic connected to the onChange event of the checkbox to actually update the record. For example:
List of fruit with inStock property bound to the checkbox value. If I now tick the checkbox it will uncheck in the interface, but soon check again as the data is re-fetched from the database (the value has not changed).
To make the change actually propagate to the backend, on checkbox onChange, I update the record so that the inStock value updates to !repeated.current.inStock (its opposite value). Now whenever the checkbox is ticked or unticked, information of the change will reach the database and the list will work as expected.