You need to sign in to do that
Don't have an account?
Pull HTMLAttributes bound to div when in an array of divs
Hello,
I have a <div> inside of an <aura:iteration> which I am binding values to.
In a Javascript function I am trying to loop through each of the divs and pull the values off to then used elsewhere.
I am having difficulty drilling into them to get the values though..
When looking at the console I can find my way to it and it look like the below screenshot. (I am trying to get "data-depField")
Console also shows me the path of: ["[[Target]]"]["0"].$attributeSet$.$values$.HTMLAttributes["data-depField"].$lastResult$
However, I am not sure how to drill into that..
Current JS code snippet:
var allFields = component.find("rad1"); console.log('allfields >>>>'); console.log(allFields); for(var i = 0; i < allFields.length; i++) { console.log('allfields each >>>>'); console.log(allFields[i].attributeSet().values('data-depField')); }
The above code tells me that "attributeSet" is not a function so I know that much but not sure how to get into it..
Any help is greatly appreciated!