repeater.onItemReady() get repeaterId

Is there a way to get the element.id of a repeater once the onItemReady() triggers?
(I mean something like the event.target.id we have for event listeners?)

I don’t think so, as it essentially returns a forEach style callback, not an event.

You can loop through children of an element if you know the parent’s id or just loop through all repeaters on the page and use some unique condition to the one you intend to use perhaps. Although the linter will tell you there’s an error if you use foreach on an element type it will still run, but you can avoid the linter error by using back ticks.

$w(Repeater).map(o => { if (condition) return o.id; });

Thanks, David.
I guess I can do something like:

const repeaters = [$w("#repeater1"), $w("#repeater2"), $w("#repeater3")];
repeaters.forEach(r => {
    r.onItemReady(($i, iData, inx) => {
        //common code....then:
        if (r.id === "repeater1"){
            // particular code.
        }
    })
}}

@jonatandor35 If you need other properties of each repeater, that would be best I think. Or if you only need the ids, you can do [‘repeater1’, ‘repeater2’, ‘repeater3’].forEach(r => $w(#${r})…