From f89f2b2146fa806c6bcabd23bb3a2af328f31f6b Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Wed, 10 Apr 2019 09:23:24 -0700 Subject: [PATCH] Reverted misguided index/collapsed behavior --- src/devtools/store.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/devtools/store.js b/src/devtools/store.js index d5f3a45b25..d81b6e89c1 100644 --- a/src/devtools/store.js +++ b/src/devtools/store.js @@ -353,12 +353,7 @@ export default class Store extends EventEmitter { break; } const child = ((this._idToElement.get(childID): any): Element); - - // We intentionally ignore collapsed state when determining an item's index. - // We only do this for the direct path to an element. - // That's because the index of the element is meaningless if it's inside of a collapsed tree. - // If this index is used to display the element, the caller should also un-collapse its ancestors. - index += child.weight; + index += child.isCollapsed ? 1 : child.weight; } previousID = current.id;