I have a blank Lightning component which I am using as a custom tab in Service Console. While the content loads fine the tab label stays on "Loading..." forever.

Component enter image description here

Tab enter image description here

Screen enter image description here

There are no errors in the Chrome console. What am I doing wrong?

UPDATE The label displays fine if I add the same tab to my custom app.

  • Any errors in the JavaScript console?
    – Keith C
    Commented Jun 23, 2017 at 17:02
  • @KeithC no errors.
    – Mossi2
    Commented Jun 23, 2017 at 19:19
  • 1
    Maybe this is not problem this component but one of AccountSearch or AccountSearchList. Can you add code of them and picture with your custom tab settings?
    – JJanek
    Commented Jun 24, 2017 at 21:18
  • @JJanek I have tried removing the body and still seeing the same behaviour. So the issue doesn't seem to be related to other components.
    – Mossi2
    Commented Jun 27, 2017 at 22:06
  • @KeithC here's an update: this seems to be only happening with Lightning tabs in Service Console. If I add the tab to my own custom app the label shows fine.
    – Mossi2
    Commented Jun 28, 2017 at 18:53

4 Answers 4


Put this line in Component.

//in markup
<lightning:workspaceAPI aura:id="workspace"/>

In Component init:

    //Js Controller
    var workspaceAPI = component.find("workspace");
    workspaceAPI.getFocusedTabInfo().then(function(response) {
        var focusedTabId = response.tabId;
            tabId: focusedTabId,
            label: "Edit Contact" //set label you want to set
            tabId: focusedTabId,
            icon: "utility:add_contact", //set icon you want to set
            iconAlt: "Edit Contact" //set label tooltip you want to set

Hope this will help you.


It looks like it is now possible to set the Tab Label using the Lightning Console JavaScript API (GA as of Winter 18).

setTabLabel() for Lightning Experience

The example in the documentation uses a button to update the tab label, but you could just as easily set it on init of the component.


Add a line in component :

<lightning:workspaceAPI aura:id="workspace"/>

Add the following code to the js controller of the component:

doInit : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.openTab({ url : '/lightning/n/yourcomponentnamefromurl', focus: true }).then(function(response){ workspaceAPI.setTabLabel({ tabId: response , label: "Label for tab" }) });

This would avoid the condition of tab label changed to some other custom tab label when a second tab is opened.

  • 1
    Please avoid asking for upvotes in your posts, it is not relevant to the answer. Thanks
    – glls
    Commented Aug 28, 2018 at 17:21

I'm quite stuck too. Here's my code:

viewAllData: function(component, event, helper) {
    var workspaceAPI = component.find("workspace");
        parentTabId: enclosingTabId,
        pageReference: {
            "type": "standard__component",
            "attributes": {"componentName": "c__BrandProfile360Cmp"},
            "state": {"uid": "1", "c__inputBPId": component.get("v.recordId")}
            tabId: enclosingTabId,
            label: "My Custom Label!" //set label you want to set

You must log in to answer this question.

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