Hello,
How is it possible to call a function when closing a widget in Web AppBuilder? For example, when the user closes a custom widget, remove the tables from the widget so the next time the user opens the widget, the tables are cleared and removed. Another example, when the user clicks "Ok" in the Splash widget, programmatically open the Layer List widget to display the layers of the web map. The documentation online does not seem to work, nor does the onDestroy method within each widget. Please let me know the appropriate way to complete this.
Thanks!
Solved! Go to Solution.
Centerline,
Each widget has an onClose event that you can use.
Robert,
Thanks for the quick solution.
Do you know if there is a method for programmatically opening a widget similar to the closePanel method:
PanelManager.getInstance().closePanel(widgetid + ‘_panel’);
This will be used to programmatically open the Layerlist widget once the user clicks "Ok" in the Splash widget.
Thanks for your help!
Centerline,
Sure there are several post about it it's just openPanel instead.
var pm = PanelManager.getInstance();
pm.showPanel(this.appConfig.widgetPool.widgets[0]);
Solution found!