jsapi-resources icon indicating copy to clipboard operation
jsapi-resources copied to clipboard

Reordering layers in layerlist cause action buttons to disappear

Open nbabel opened this issue 4 years ago • 11 comments

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 avatar Feb 16 '21 22:02 nbabel

@nbabel can you provide a github repo or stackblitz the reproduces the issue? Thanks!

andygup avatar Feb 17 '21 15:02 andygup

@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.

nbabel avatar Feb 17 '21 22:02 nbabel

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

nbabel avatar Feb 18 '21 17:02 nbabel

Thanks for clarifying and providing a sample @nbabel! We will take a look.

andygup avatar Feb 18 '21 17:02 andygup

This has been fixed on next, but may not have been deployed to npm. https://codepen.io/kekenes/pen/qBqKBxB?editors=1000

ekenes avatar Mar 02 '21 23:03 ekenes

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?

nbabel avatar Mar 03 '21 17:03 nbabel

npm install @arcgis/core@next

odoe avatar Mar 03 '21 17:03 odoe

Thanks @odoe, but what is @next? I'm not familiar with that.

nbabel avatar Mar 03 '21 17:03 nbabel

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.

ekenes avatar Mar 03 '21 18:03 ekenes

Thanks for the clarification @ekenes.

nbabel avatar Mar 03 '21 18:03 nbabel

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.

github-actions[bot] avatar Jul 22 '22 00:07 github-actions[bot]

This issue has been automatically closed due to inactivity. If you need additional assistance please contact Esri Technical Support.

github-actions[bot] avatar Aug 22 '22 00:08 github-actions[bot]