Checkbox in repeated List is not changing on Tap

I’ve put together a simple app:

Container with repeat data from a Firestore DB

Container has 2 x cells

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.

Hi, is the checkbox value bound to a true/false type property in the list that it’s repeated from? If it’s not, it won’t change:

Hello Mari, thank you for the quick reply!

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:

  1. 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).

  1. 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. :slight_smile: