Currently when the layer is not loaded because of any kind of error, it is not shown in layerTree. I would like it to be shown in layerTree with error indicator - red styled text or some warning icon.
I already tried to listen on layerview-create-error and then set listMode manually but it does not help.
layer.on('layerview-create-error', function(error: any) {
layer.listMode = "show";
});
The layer itself is stored with map.layers collection so the LayerList widget must be filtering it out by some attribute. I cannot change loadStatus or loaded attributes as it will break other things with not loaded layer.