0

I am able to change the label of the TAB of the target aura component in salesforce by the help of the workspace API, but still label and whenever user hover over it says Loading screen. below is my code kindly help me out:

i need to set the logo as something else instead of Loading icon and when ever user hover then it should not say loading

workspaceAPI.getEnclosingTabId().then((response) => {
            let opendTab = response.tabId;
            workspaceAPI.setTabLabel({
                tabId: opendTab,
                label: "Test Aura Name Change"
            });
        })

1 Answer 1

0

Update your code to also update the tab icon using setTabIcon.

workspaceAPI.getEnclosingTabId().then((response) => {
   let opendTab = response.tabId;
   workspaceAPI.setTabLabel({
       tabId: opendTab,
       label: "Test Aura Name Change"
   });
   workspaceAPI.setTabIcon({
       tabId: opendTab,
       icon: 'standard:user_role',
       iconAlt: 'This is the hover text over icon'
   });
});

Another important thing I found is if you use the STANDARD icons, they will be sized appropriately in their inverse variant. But, as per this answer, if you used icons from the other sets {Utility, Custom, Action etc} they will be sized too large and you do not get a variant option to try to size them correctly. SetTabIcon only utilizes 3 arguments; tabId, icon, and iconAlt.

You must log in to answer this question.

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