How to use .forItems() on a repeater?

@hideon96 so, I think that is a good case for changing the documentation.

@marlowe-shaeffer , can you ask someone to clarify the documentation regarding the .forItems() method?

As I test it, the IDs are not the name of the elements inside the repeater, but the ID they get from the data they are connected to.

So if you use an ID like “d99d3cc8-bc75-ec47-6c72-f713016f98f3” , it is going to work as intended, but the API Documentation is not that clear.

Here is the example I tested it:

$w.onReady(function () {
    $w('#repeater1').forItems(
        [
            '7bb38a7a-70b7-9cf3-fc80-584205694465',
            'd99d3cc8-bc75-ec47-6c72-f713016f98f3',
        ],
        ($item, itemData, index) => {
            console.log(index)
        }
    )
})