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

241
2
01-03-2022 09:22 PM
Labels (1)
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.

0 Kudos
2 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


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