Hey all,
Was wondering if anyone had figured out a way around this. I've found several posts about the frustration of organizing layers on Experience Builder (since this was such an issue with web app builder, figured this would have been a focus?)
Here's a post discussing some of the ways around this:
https://community.esri.com/t5/experience-builder-tips-and-tricks/five-ways-to-handle-groups-of-layers/ba-p/1343821
To reiterate my goal from my post title: I want to control the order of the layers within the layer list widget from within Experience Builder, not within the web map, because I want to maintain the draw order that I set within the web map. Therefore, I also do not want to create groups from within the web map, since that will mess up the draw order. I should be able to create both groups and re-order the layers directly on the experience builder side.
I've also attempted to use @JeffreyThompson2 widget (thank you!) to help add and remove groups of layers here:
https://community.esri.com/t5/experience-builder-custom-widgets/add-remove-layers-by-group/m-p/1295061
However, when re-creating a layerlist type component you lose all of the functionality of things like search, adding to attribute table, export, setting filter, etc etc. We should be able to alter the layer list widget directly.
This was an issue with web app builder as well, but there were ways around it like the community created "table of contents" custom widget. Also, back then I was able to create a custom layerlist using advice from @RobertSheitlin_GISP for web app builder:
https://community.esri.com/t5/arcgis-web-appbuilder-questions/permanently-change-the-order-in-layer-list-widget/td-p/10943
Where you alter the LayerListView.js refresh function and hard code the layers in with IDs.
Is there anywhere in Experience Builder's code where we could alter the order and layers that are being displayed within the Layer List widget? This should really be something built into Experience builder though.