-
-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tree-view): do not flatten original
nodes
(#2056)
`$: nodes = traverse(nodes);` is unexpectedly mutating the original `nodes` reference used to render `TreeView`. As a result, a tail leaf node is appended to the top-level list. Flattening is necessary to obtain a reference to all node IDs (to programmatically show/hide nodes). This fix creates a new reference `flattenedNodes` instead of overriding the original `nodes`.
- Loading branch information
Showing
1 changed file
with
12 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters