From 4c9f5aee72875248e65d02889a4fc89ecc4e9580 Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Tue, 3 Dec 2024 14:45:11 +0100 Subject: [PATCH] exploded pathIds should be int --- public/js/pimcore/treenodelocator.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/js/pimcore/treenodelocator.js b/public/js/pimcore/treenodelocator.js index 6bebd583f5..bcd022f2f3 100644 --- a/public/js/pimcore/treenodelocator.js +++ b/public/js/pimcore/treenodelocator.js @@ -128,7 +128,7 @@ pimcore.treenodelocator = function() fullPath: res.fullpath, // mind lower case here! typePath: res.typePath, sortIndexPath: res.sortIndexPath, - pathIds: res.idPath.replace(/^\//, "").split("/"), + pathIds: res.idPath.replace(/^\//, "").split("/").map(Number), elementType: elementType, locateConfigs: locateConfigs, currentTreeIndex: 0 @@ -260,7 +260,7 @@ pimcore.treenodelocator = function() if (pagingData) { var nodePath = node.getPath(); - var nodePathIds = nodePath.replace(/^\//, "").split("/"); + var nodePathIds = nodePath.replace(/^\//, "").split("/").map(Number); var childNodeId = treeState.pathIds[nodePathIds.length]; var total = parseInt(pagingData.total); var limit = parseInt(pagingData.limit); @@ -281,12 +281,12 @@ pimcore.treenodelocator = function() // elementKey (from fullPath): if (globalState.elementType == "document") { - var sortIndexParts = globalState.sortIndexPath.replace(/^\//, "").split("/"); + var sortIndexParts = globalState.sortIndexPath.replace(/^\//, "").split("/").map(Number); let sortIndexPath = sortIndexParts[pos]; var elementKey = sortIndexPath; } else { if (sortBy == "index") { - var sortIndexParts = globalState.sortIndexPath.replace(/^\//, "").split("/"); + var sortIndexParts = globalState.sortIndexPath.replace(/^\//, "").split("/").map(Number); let sortIndexPath = sortIndexParts[pos]; var elementKey = sortIndexPath; } else {