@samitouri / QOS-React / commits / f2951fb51f

Preserve selection on exiting owner mode

Dan committed Apr 7, 2019 at 17:40 UTC f2951fb51fa338da7a651cf414a074f2acf8b4cb
1 file changed +4 -1
src/devtools/views/Components/TreeContext.js
+4 -1
@@ -383,7 +383,10 @@ function reduceOwnersState(store: Store, state: State, action: Action): State {
383 case 'RESET_OWNER_STACK':
384 ownerStack = [];
385 ownerStackIndex = null;
386 - selectedElementIndex = null;
386 + selectedElementIndex =
387 + selectedElementID !== null
388 + ? store.getIndexOfElementID(selectedElementID)
389 + : null;
390 _ownerFlatTree = null;
391 break;
392 case 'SELECT_ELEMENT_AT_INDEX':