File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
packages/react-devtools-shared/src/devtools Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,11 @@ import {
2828 SUSPENSE_TREE_OPERATION_RESIZE ,
2929 SUSPENSE_TREE_OPERATION_SUSPENDERS ,
3030} from '../constants' ;
31- import { ElementTypeRoot , ElementTypeActivity } from '../frontend/types' ;
31+ import {
32+ ElementTypeRoot ,
33+ ElementTypeActivity ,
34+ ComponentFilterActivitySlice ,
35+ } from '../frontend/types' ;
3236import {
3337 getSavedComponentFilters ,
3438 setSavedComponentFilters ,
@@ -2099,6 +2103,18 @@ export default class Store extends EventEmitter<{
20992103 }
21002104 }
21012105
2106+ for ( let j = 0 ; j < this . _componentFilters . length ; j ++ ) {
2107+ const filter = this . _componentFilters [ j ] ;
2108+ // If we're focusing an Activity, IDs may have changed.
2109+ if ( filter . type === ComponentFilterActivitySlice ) {
2110+ if ( nextActivitySliceID === null || nextActivitySliceID === 0 ) {
2111+ filter . isValid = false ;
2112+ } else {
2113+ filter . activityID = nextActivitySliceID ;
2114+ }
2115+ }
2116+ }
2117+
21022118 this . emit ( 'mutated' , [
21032119 addedElementIDs ,
21042120 removedElementIDs ,
You can’t perform that action at this time.
0 commit comments