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

1357
3
01-03-2022 09:22 PM
JamieLambert
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.

ExB_Expand_Layers_by_Default.png

 Jamie.

3 Replies
Kanin
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,
Kanin 

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

0 Kudos
FredericPoliart_EsriAU
Occasional Contributor II


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     
   item.
visibilityMode: "exclusive"   << make children radiobuttons
   item.layer.listMode = 'hide'   << this hides the legend patch 
   item.panel.open = true  << ?? not sure ??



0 Kudos
lmurrayADOT
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....