Expand grouped layers in Layers Widget by default - Experience Builder (ExB)

01-03-2022 09:22 PM
Labels (1)
Occasional Contributor III

Hi All,

Are you able to expand grouped layers in the Layers Widget in Experience Builder (ExB) by default? And further to that, can you expand some by default and keep others collapsed? Thanks.



3 Replies
by Esri Contributor
Esri Contributor

I understand this could be possible with custom widgets in the Developer Edition of ExB, with some coding:

Alternatively, please feel free to post this in ArcGIS Experience Builder Ideas as well:

Best regards,

If this answer solved your question, please mark it as "Accept as Solution" to help others who have the same question.

0 Kudos
Occasional Contributor

In the LayerList , in 

listItemCreatedFunction: (event) => {

you should be able to set:

if (item.layer.type == 'group') {
   item.layer.ariaExpanded = true   <<not working?
   item.layer.open = true    << not working?? 
   item.layer.title= "this is a group"   << rename your group layer
   item.layer.visible= false     
visibilityMode: "exclusive"   << make children radiobuttons
   item.layer.listMode = 'hide'   << this hides the legend patch 
   item.panel.open = true  << ?? not sure ??

0 Kudos
New Contributor III

I know this is an older post but this is a feature I could use.  It didn't look like anyone added this to the ArcGIS Ideas website so I went ahead and created one.  https://community.esri.com/t5/arcgis-experience-builder-ideas/expand-grouped-layers-by-default/idi-p....