Issues with onViewerAdded and onViewerClosed events

onViewerAdded event is sent twice and onViewerClosed is never sent. To reproduce please run the following snippet, and then from the main menu open the Filters viewer (Add->Filters). After that close the Filters by clicking on the x button on the viewer’s toolbar.

let grid =, 100)).grid;

let nCallCount = 0; => {
   console.log("Call Count: " + nCallCount);
}); => {
    console.log("Never gets called.");

Hi and sorry for delay!
I fixed duplicate events, but can’t now reproduce absent of the onViewerClosed event. Could you reproduce it on

I can confirm that onViewerClosed is now called, but both onViewerAdded and onViewerClosed are called 4-5 times each, so the issue doesn’t seem to be fixed.

Dev server wasn’t redeployed, please check it now.

Now both seem to be fixed when a viewer is opened using the main menu, but not when using the JS API in which case none is called.

const viewerFilters = DG.Viewer.filters(dframe);, ‘left’, null, ‘Filters’);

1 Like

Ok, I will check it.

These events should not be triggered when you use, because it’s a general dock. But they will be triggered if you use TableView.addViewer().