Hi, I created a custom widget with Web Appbuilder 1.2 developer version, and noticed the widget's callback functions behaved differently when I use Launchpad theme. For example, onOpen function is called only once when I opened it the first time, and onClose callback function is never called when I closes the widget panel. is this a intended behavior, or is it a bug?
Thanks,
Roman
Solved! Go to Solution.
Roman,
Here is a work around you can apply to your widget to fix the onClose issue.
I add the dojo/aspect require and then in the postCreate function I add the code below.
/*Workaround for the LanunchPad theme not firing onClose and onOpen for the widget*/ if(this.appConfig.theme.name === "LaunchpadTheme"){ var tPanel = this.getPanel(); if(tPanel){ aspect.after(tPanel, "onClose", lang.hitch(this, this.onClose)); aspect.after(tPanel, "onOpen", lang.hitch(this, this.onOpen)); } } /*end work around for LaunchPad*/
Roman,
Here is a work around you can apply to your widget to fix the onClose issue.
I add the dojo/aspect require and then in the postCreate function I add the code below.
/*Workaround for the LanunchPad theme not firing onClose and onOpen for the widget*/ if(this.appConfig.theme.name === "LaunchpadTheme"){ var tPanel = this.getPanel(); if(tPanel){ aspect.after(tPanel, "onClose", lang.hitch(this, this.onClose)); aspect.after(tPanel, "onOpen", lang.hitch(this, this.onOpen)); } } /*end work around for LaunchPad*/
It's working great. Thank you Robert.
It's the launchpad panel's bug, when panel is closed, it doesn't close its widget. This bug will be fixed in next release.
Is ESRI aware the same happens with the Tab Theme when the widget is located in the "Other Panels"?