You need to sign in to do that
Don't have an account?
jojoforce
lightning:tabset child components within a tab is undefined until tab is activated
I'm encountering a weird situation in using lightning:tabset, apparently, if the user has not yet navigated (or activated) a tab, the child component in it will be undefined thus any attributes in that component will not be accessible.
For example... If I have not activated tab2 (meaning, the user did not click tab2 yet) then component.find('tab2') will be undefined.
For example... If I have not activated tab2 (meaning, the user did not click tab2 yet) then component.find('tab2') will be undefined.
<lightning:tabset> <lightning:tab tab1> <c:component_in_tab1 aura:id="tab1" /> </lightning:tab> <lightning:tab tab2> <c:component_in_tab2 aura:id="tab2" /> </lightning:tab> </lightning:tabset>
var cmp = component.find('tab2'); // THIS THROWS UNDEFINED var dataAttribute = cmp.get('v.myAttribute');
Raj Vakati
Try some thing like below
Pankaj Nayak 13
Hi, Did you get the answer for this ?