I'm creating a List that has one or more buttonIcons in the end.I'm creating these buttons dynamically with $A.createComponent
.
While clicking the button,I need to find which button is clicked and then finding its position with getBoundingClientRect()
.
How can I do it?
I tried event.getSource()
,event.currentTarget
& event.target
.
Nothing helped!
Or Is there any ways to find the position of a element in lightning.
(I need to show a popup relative to the button's position,can't use lightning:helptext)
Best Answer
getBoundingClientRect
Refer this QA,`
`