1

I have a problem regarding on displaying lightning:icon in Lightning:tabset after an Winter 19 update the Lightning:icon is not displaying an image. Here's my code:

    <lightning:tabset variant="vertical">
      <lightning:tab>
         <aura:set attribute="label">
           <lightning:icon iconName="utility:unlock"/>  
               Authentication
            </aura:set>
            <aura:set attribute="body">
               <c:AuthenticationComponent/>
           </aura:set>
        </lightning:tab>
   </lightning:tabset> 

This code is working but after an update of Winter '19 icon is not displaying.

  • I think, there is an issue with mention code. We don't have label attribute for tabset. You should get compile time error with this code? – Pragati Jain Oct 15 '18 at 11:43
  • @PragatiJain Sorry, i forgot to put lightning:tab in lightning:tabset but the problem is the lightning:icon is not working in Lightning:tab using aura:Set. Can you help me? on how to display the icon in Lightning:tab? – Clark Siruno Oct 15 '18 at 22:57
  • 1
    Yes, this is a bug in Winter 19. Please log a case for this. – Pragati Jain Oct 16 '18 at 7:12
3

The Winter 19 release notes adds a possible reason for this...

lightning:tab

The label attribute now supports text only. Previously the label supported a component type, and you could include, for example, an icon in the tab’s label. If you use a component in a lighting:tab label now, only the text portion of the label value displays. Any CSS classes that are applied are ignored.

Taken from the bottom of this page: https://releasenotes.docs.salesforce.com/en-us/winter19/release-notes/rn_lc_components.htm

|improve this answer|||||
2

In order to resolve this issue in displaying the Lightning:icon in Lightning:tabset. As an alternative, I used slds-vertical-tabs instead of Lightning:tabset and it's working. You can reference in this link: https://www.lightningdesignsystem.com/components/vertical-tabs/

|improve this answer|||||
  • It sounds like you just added the SLDS and used <div>'s vs <lightning:tab>, is that correct? Did you have to add your own functions in the controller to switch between tabs? – sfdcJameson Sep 26 '19 at 14:27
  • Yes, I used <div> instead of Lightning:tab. Then I added a function to switch between tabs. – Clark Siruno Oct 3 '19 at 16:40

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.