I am adding/removing layers nested within group layers. These modifications do not seem to always cause a refresh/ trigger the listItemCreatedFunction to rerun. I need the listItemCreatedFunction to run everytime i add/remove layers from the map/nested groups.
How can I force a refresh of the layerlist? I have noticed that the layerlist triggers listItemCreatedFunction at initial creation and also when using sketchviewmodel.complete().
I've considered creating a new layerlist and replacing the existing list, but that seems like a resource intensive option.
Any suggestions?