Bug: i is not passed to the event handler for Dropdown Menu

I have a Dropdown button that is mapped with an object array.

If I try and get the index of the clicked button in a js query handler - it always gives me 0:

// jsHandleButton
console.log(i) // displays 0

However if I do it directly from the query handler window it works:

image

And this also works:

image