Skip to content

Commit

Permalink
exploded pathIds should be int
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 committed Dec 3, 2024
1 parent a4fa58f commit 4c9f5ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/js/pimcore/treenodelocator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -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 {
Expand Down

0 comments on commit 4c9f5ae

Please sign in to comment.