Reordering layers in layerlist cause action buttons to disappear
Adding a layerlist to the mapview with group layers, legend and transparency action buttons, and selectionEnabled = true causes the legend and transparency action buttons to disappear upon layer reordering. This happens for all the layers in the group being reordered but not layers in other groups. This did not happen with 4.17 and webpack. It also doesn't happen with 4.18 using the cdn. It seems to limited to 4.18 and the ES Modules.
@nbabel can you provide a github repo or stackblitz the reproduces the issue? Thanks!
@andygup I just downloaded this repo to create an example for you and I can't recreate the error. So it must be something specific to my app. I edited the repo to be closer to may app, @arcgis/core v4.18.0, angular v8.2.14. But still can't recreate the problem.
I was able to recreate the problem at the api level. The issue is when you reorder layers within a subgroup (group within a group). Here is a pen that shows the problem: https://codepen.io/nbabel/pen/ExgNMwO
I also created a geonet post about it since it seems to be an issue with the api itself not necessarily this repo. https://community.esri.com/t5/arcgis-api-for-javascript/add-a-legend-to-layerlist-sample-with-group-layers-and/m-p/1028136#M71811
Thanks for clarifying and providing a sample @nbabel! We will take a look.
This has been fixed on next, but may not have been deployed to npm. https://codepen.io/kekenes/pen/qBqKBxB?editors=1000
Thanks @ekenes I just did a fresh npm install with "@arcgis/core": "^4.18.0" and it did not fix the issue. Is there an incremental release I should update to or will this be in the 4.19 release?
npm install @arcgis/core@next
Thanks @odoe, but what is @next? I'm not familiar with that.
https://github.com/Esri/feedback-js-api-next It's basically our developer build that gets updated daily, so you can test what's coming in the next release.
Thanks for the clarification @ekenes.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you need additional assistance please contact Esri Technical Support. Thank you for your contributions.
This issue has been automatically closed due to inactivity. If you need additional assistance please contact Esri Technical Support.