mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Reverted misguided index/collapsed behavior
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user