TreeTable Hierarchy Maintenance problem
OpenUI5 version: 1.52+ Browser/version (+device/version): Chrome 67 Any other tested browsers/devices(OK/FAIL):
URL (minimal example if possible): https://openui5.hana.ondemand.com/#/sample/sap.ui.table.sample.TreeTable.HierarchyMaintenanceJSONTreeBinding/code/Controller.controller.js
The example always pastes the items as the last ones of the children of the target item. But I want to paste at the beginning or in other position.
Steps to reproduce the problem:
- Change the line 132 in the example oNewParent.categories = oNewParent.categories.concat(this._aClipboardData); to oNewParent.categories = this._aClipboardData.concat(oNewParent.categories);
- Execute the example and cut the item Boys->Clothing->Shirt->Black T-Shirt
- Expand the tree as below

- Paste the item in Women
What is the expected result? I expect that the hierarchy does not change What happens instead? The hierarchy has changed, for example clothing was expanded, and now it is collapsed.
Any other information? (attach screenshot if possible)
Hi @pepejuarez,
I was able to reproduce this and created an internal ticket #1880373492 for the owners of that sample to check on this.
The status of the issue will be updated here in GitHub.
Best regards, Merlin
Hi @pepejuarez ,
The state of the tree will only be preserved, if items are appended to a node. As you have experienced, inserting items at the beginning or in between corrupts the state of subsequent nodes. Therefore we do not recommend it and there is no example showing it. But maybe we should add this information to the example to avoid confusion...
Best regards, Alexander
Hi, Is there any update here?
Best Regards, Tritty