From ebe5b312096b5b7190caada61912a8012ca2fe3b Mon Sep 17 00:00:00 2001 From: JZacaroli <32681029+JZacaroli@users.noreply.github.com> Date: Fri, 1 Jul 2022 07:58:08 +0100 Subject: [PATCH] fix: fix scrollToNode function by renaming "clusterize-extra-row" to "infinite-tree-extra-row" (#63) Co-authored-by: cheton --- src/infinite-tree.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/infinite-tree.js b/src/infinite-tree.js index eefd015..60e7f37 100644 --- a/src/infinite-tree.js +++ b/src/infinite-tree.js @@ -1492,10 +1492,11 @@ class InfiniteTree extends events.EventEmitter { } // Scroll to a desired position + const prefix = 'infinite-tree-'; let firstChild = this.contentElement.firstChild; while (firstChild) { const className = firstChild.className || ''; - if (className.indexOf('clusterize-extra-row') < 0 && (firstChild.offsetHeight > 0)) { + if (className.indexOf(prefix + 'extra-row') < 0 && (firstChild.offsetHeight > 0)) { break; } firstChild = firstChild.nextSibling;