Is there a way to launch a widget from a button but not have a panel/UI?
- I have a custom widget (widget A) and within that, from a button click user need to open another widget (widget B) , but widget B should not added to the UI/panel.
Sreehari,
If you have a widget that is developed to not have a panel (ie. the manifest.json has "inPanel": false,) then you can call if from a button using the code in this link:
https://community.esri.com/thread/219253-open-widget-programatically-foldable-theme
Hi Robert,
Thanks for the help. This worked for me (Launchpad Theme).
var widgetsCfg = this.appConfig.widgetPool.widgets;
var widgetId;
for(var i in widgetsCfg){
if(widgetsCfg.name == "MyWidget_Name"){
widgetId = widgetsCfg.id;
break;
}
}
var widgetCtlr = WidgetManager.getInstance().getWidgetsByName("AnchorBarController")[0];
widgetCtlr.setOpenedIds([widgetId]);