From 31d1b84bb9efa9d69f81f84b2295eaf3dc03cedd Mon Sep 17 00:00:00 2001 From: joan Date: Mon, 10 Oct 2022 10:25:59 +0200 Subject: [PATCH] Unfold when there's less than 100 nodes to show --- modules/zone/back/methods/zone/getLeaves.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/zone/back/methods/zone/getLeaves.js b/modules/zone/back/methods/zone/getLeaves.js index db17beb1b..1b5b116e7 100644 --- a/modules/zone/back/methods/zone/getLeaves.js +++ b/modules/zone/back/methods/zone/getLeaves.js @@ -59,7 +59,10 @@ module.exports = Self => { } const leaves = map.get(parentId); - setLeaves(leaves); + + const maxNodes = 100; + if (res.length <= maxNodes) + setLeaves(leaves); return leaves || []; };