Closed Vanathi21 closed 6 years ago
As the interface of tab and tabset is very restrictive (no programmatic access to the content they host), I think the best option would be to test components which get hosted in the tabs in isolation, and keep the amount of logic which composes the UI into tabs etc. to bare minimum.
For example,
<lightning:tab label="detail">
<c:myRecordDetails>
</lightning:tab>
Now as most the custom javascript logic would be inside c:myRecordDetails that could be tested in isolation.
We have referred the workaround suggested for lightning buttons and tried up with aura:method to expose the controller actions. Now we have a case where we dont have logic defined in controller actions. Necessary items where defined in the lightning:tab itself.need to switch between the tabs. sample snippet :
Can you please suggest some workaround to handle the lightning:tab ?