Hello everyone!
I'm trying to programmatically open widget that is in "Widget Controller".
I have tried
WidgetManager.getInstance().openWidget(widgetId)
and
const action = appActions.openWidget(widgetId);
getAppStore().dispatch(action);
Both attempts opened the widget, but only when the widget had been previously opened.
Is there a way how to open widget that was not yet opened?
I'm using ArcGIS Experience Builder Developer Edition version 1.5.
Thanks, Matěj.
Solved! Go to Solution.
This is something that was not possible in versions before 1.6.
https://developers.arcgis.com/experience-builder/sample-code/widgets/control-the-widget-state/
I'd also like to know of a solution. I have a widget I would like to have open when the app loads.
This is something that was not possible in versions before 1.6.
https://developers.arcgis.com/experience-builder/sample-code/widgets/control-the-widget-state/
Awesome! Thanks for the notice. Did 1.6 come out this week?
Robert do you know how we would tell the widget to open at a certain position within a map view?
Not have not looked into that yet
Hi @MatejKutik
Were you able to use the sample code to open the widget as the application loaded? You mentioned your sample worked but only if the Widget had been opened at least once.
In 1.13 you can load widget and then open it:
const widgetManager = WidgetManager.getInstance();
widgetManager.loadWidgetClass(widgetId);
widgetManager.openWidget(widgetId);