Select to view content in your preferred language

Nesting a widget in another

846
2
01-31-2023 03:02 PM
LondonWalker
Regular Contributor

Hi,

Is there anyway to nest one widget in another? I have created an accordian widget and would like one of the drop downs to have a search function in it. Can I reference a search widget out of the document or do I need to make my own within the widget file?

Thank you!

0 Kudos
2 Replies
Edward_Wong_ez
New Contributor

Hey, I did created a Custom widget that can load in any other widget by passing in the widgetID

you can make use of the WidgetManager-class methods.
.getInstance().loadWidgetClass(widgetID)
.getInstance().getWidgetClass(widgetID)

openWidget(widgetID)

This might help
https://developers.arcgis.com/experience-builder/sample-code/widgets/control-the-widget-state/#for-t... 

0 Kudos
LondonWalker
Regular Contributor

Hi, would you be willing to share more details or do you have it on git? I am so stuck and it would be so helpful!

 

Thank you so much for responding!

0 Kudos