File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -194,8 +194,8 @@ class ReactSortableTree extends Component {
194
194
195
195
instanceProps . searchQuery = nextProps . searchQuery ;
196
196
instanceProps . searchFocusOffset = nextProps . searchFocusOffset ;
197
- newState . instanceProps = instanceProps ;
198
-
197
+ newState . instanceProps = { ... instanceProps , ... newState . instanceProps } ;
198
+
199
199
return newState ;
200
200
}
201
201
@@ -313,7 +313,7 @@ class ReactSortableTree extends Component {
313
313
return { searchMatches : [ ] } ;
314
314
}
315
315
316
- const newState = { } ;
316
+ const newState = { instanceProps : { } } ;
317
317
318
318
// if onlyExpandSearchedNodes collapse the tree and search
319
319
const { treeData : expandedTreeData , matches : searchMatches } = find ( {
@@ -333,7 +333,7 @@ class ReactSortableTree extends Component {
333
333
334
334
// Update the tree with data leaving all paths leading to matching nodes open
335
335
if ( expand ) {
336
- newState . ignoreOneTreeUpdate = true ; // Prevents infinite loop
336
+ newState . instanceProps . ignoreOneTreeUpdate = true ; // Prevents infinite loop
337
337
onChange ( expandedTreeData ) ;
338
338
}
339
339
You can’t perform that action at this time.
0 commit comments