Select to view content in your preferred language

Want to hide the Open/Expand button of a layer with sublayers (inside a LayerList)

196
1
Jump to solution
08-08-2024 10:25 AM
andrewc213
Emerging Contributor

I have a layer called "Street labels" whose map data and the structure of that data I cannot modify. As you can see, the organization of its sublayers (and the mere fact that it has sublayers at all) is unintuitive:

image.png

There are separate sublayers for each different level of zoom detail (not to mention the extra "Street labels" sublayer within the "Street labels"). This layer is supposed to be one single, consolidated layer (without any sublayer options at all), but I cannot modify it since I'm pulling it from a URL provided by my organization. Is there a TypeScript/ReactJS workaround such that I can hide the highlighted Open/Expand button?

0 Kudos
1 Solution

Accepted Solutions
Sage_Wall
Esri Contributor

Hi @andrewc213 

Set the listMode on the layer to `hide-children😀

View solution in original post

1 Reply
Sage_Wall
Esri Contributor

Hi @andrewc213 

Set the listMode on the layer to `hide-children😀