Hi, I have buttons in a repeater. when I click the button, I am trying to recover the item clicked using event.context and $item(“dataset1”).getCurrentItem().
Every time the button was clicked, irrespective of where the click happened, code was always picking up the first element in the repeater.
So I printed out the event object and I saw that the issue is with the itemId in event.context. The snapshot of the console.log is below
If you see the itemId- I have marked out the extra characters that are coming at the end of the itemId. This is only happening with this particular repeater. None of the other repeaters have this in the itemId. Once I manually removed these characters from itemId using substring, then the right element started getting accessed.
Any idea, why itemId is getting “corrupted” this way? And this seems to be happening with this specific repeater and not consistently. On some item clicks this happens on others, it gives the right ItemId