2

I have a problem in displaying lightning:icon in Lightning:tabset after the release of Winter 19, 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.

3
  • 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? Commented Oct 15, 2018 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? Commented Oct 15, 2018 at 22:57
  • 1
    Yes, this is a bug in Winter 19. Please log a case for this. Commented Oct 16, 2018 at 7:12

2 Answers 2

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

0
3

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/

2
  • 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? Commented Sep 26, 2019 at 14:27
  • Yes, I used <div> instead of Lightning:tab. Then I added a function to switch between tabs. Commented Oct 3, 2019 at 16:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .