How to show a confirmation pop-up when removing a report from a dashboard via the 'X' button?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
19m ago
Hi everyone,
I have a business requirement to display a confirmation pop-up (e.g., "Are you sure you want to remove this report from the dashboard?") whenever a user clicks the remove (X) button on a dashboard report widget.
The challenge I'm facing is reaching the code behind the remove button: In the sys_widgets table, the widget's Render type is set to Java, and it calls com.glide.ui.portal.RenderReport. Because of this Java rendering, I cannot directly edit the HTML/JS inside the widget to attach a client-side confirm dialog to the 'X' button.
Since the 'X' button is rendered by the dashboard container shell, what is the best way or recommended workaround to intercept this remove event and trigger a confirmation pop-up (like GlideModal or a native JS confirm) before the report is actually removed from the page?
Any code snippets or guidance on how to achieve this would be greatly appreciated!
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
16m ago
The best approach is to intercept the dashboard’s remove event rather than modifying the Java-rendered widget. Add a client-side handler on the dashboard container, show confirm() or a GlideModal, and proceed with removal only after confirmation. Avoid changing RenderReport/OOB code because upgrades may overwrite it.