0

My this question is in extension of this. My client want to show Popup instead of in Utility Bar.

Our users work on multiple accounts in the service console. based on this issue if the condition satisfies it opens the popup in all tabs. eg. If my 10 tabs are opened in the service console, then a popup will appear in all 10. I want to show this popup to appear only on the active one.

if it's not possible, then is it possible to close all popup at once using some event?

1 Answer 1

2

I am not sure why does it matter if you open a popup from utility or a page component, the requirement is to open a popup, Anyways here is another method of doing the same thing via workspace api if your component is on each page:

While firing the Application event, you can pass the focused tab id of the console app.

workspaceAPI.getFocusedTabInfo().then(function (response) {
    var focusedTabId = response.tabId;
    //Fire your message here with focused tab id as the parameter

}).catch(function (error) {
    console.log(error);
});

Then in your component which is inside the page, after listening to the message you can do following:

workspaceAPI.getEnclosingTabId().then(function (enclosedTabId) {
    // Match here if your `enclosedTabId` is equal to the `tabid which is passed` from the event, that means your active tab condition satisfies and open your modal or do your action
}).catch(function (error) {
    console.log(error);
});
4
  • Because first that popup appears on utility bar and second second once I open another action from utility bar it closes the existing one, and user mis some steps in the process Commented Dec 7, 2020 at 2:33
  • That can be simply fixed via css change to show popup in whole screen, instead of utility, we did that in production. Commented Dec 7, 2020 at 2:34
  • Main issue is the second one, where I want to keep the existing utility bar open Commented Dec 7, 2020 at 2:35
  • Ok, the above should work as a workaround, just pass the focused tab id from source. Commented Dec 7, 2020 at 2:36

You must log in to answer this question.

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