animesh - I need to display "Add widget" and "D...
I need to display "Add widget" and "Delete Report" button on the liveboard page and hide the buttons when user navigates to edit widget page. In my understanding this can be achieved by listening to HostEvent events.
I can listen to edit viz event. but when the user is returning back to reports page by pressing the close button on edit widget page, I am not receiving any sort of event.
6 Replies


@Justin PTAL

Hey @animesh , it seems we have a gap there, we raised an internal ticket to have an event for when the dialog is closed.
As a workaround for you, when the edit answer loads, we trigger a
Data
event, and that is triggered again when we close the dialog, with saved or discarded changes.
So, you can listen for Data
event twice to indicate that the modal is closed. Hope that helps.@jbc Isn't there a specific event which I can rely on on the reports page. instead of relying on the number of times the Data event is triggered, dont we have a specific event of making sure that the reports page is visible or loaded or loading. So that I can display the "Add Widget" and "Delete report" buttons again.
listening to the closed event still looks good. But this closed event should be triggered when the Answer window actually closes. As by pressing the "close" button on the banner, sometimes if there are unsaved changes we get to see the save changes dialog.
@jbc @shikharTS @Justin can you please create some ticket so that i can track the progress. I don't see any updates on this thread.
Do you have a support ticket for this?
You can create one and track the official updates there. Since discord is maintened just by developers, it is possible that we will miss some updates to give here..