0

I have one lightning component named "Add/Edit Invoice Line Item" (as seen on screenshot) I want to reload this component every time a user clicks on this tab. Is there any way or event which can be used to handle this? Screenshot

0

Thanks for your help!

I have searched for the solution for 2 days (asked multiple people and checked documentation) but couldn't find anything. So I have added an idea for salesforce to provide developers with Accessible Lightning Events from Lightning Page. If you think this Idea can be useful to you as a developer the please upvote.

Idea: Accessible Lightning Events from Lightning Page. (https://success.salesforce.com/ideaView?id=0873A000000CZbzQAG)

Thanks

0

lightning:tab by default will load only 1st time when it gets focus - there-by rendering the content/component in its body. Even when you navigate away from that tab, the content will just be hidden but not unrendered.

Workaround: aura:if will render/unrender content in it depending on the condition. So use aura:if inside each tab. The condition can be {!v.selectedTabId=='tab1'}. You can set the selectedTabId by using onactive on lightning:tab.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.