Job description
I need to rebuild the standard Layer List widget which is available in ArcGIS Javascript API:
https://developers.arcgis.com/javascript/latest/sample-code/widgets-layerlist/
Currently when the user clicks the eye icon or layer name it toggles the visibility of the parent layer. I need to change this action - when the user clicks on the layer name it should expand the list of the child layers (or shrink if it's expanded) in the same way as clicking on the triangle arrow.