Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit a92309d

Browse files
committed
#153 set position localy to not load complete collection for parent
1 parent 4c14104 commit a92309d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Resources/assets/js/adapter/fancytree.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,13 @@ export class FancytreeAdapter {
269269

270270
let moveNodeInTree = (responseData) => {
271271
dropedNode.remove();
272+
if (positionBefore) {
273+
parentNode.children.forEach((node) => {
274+
if (node.data.position >= responseData.descriptors.position) {
275+
node.data.position++;
276+
}
277+
});
278+
}
272279
parentNode.addChildren(requestNodeToFancytreeNode(responseData));
273280
};
274281

0 commit comments

Comments
 (0)