File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
packages/react-devtools-shared/src/devtools/views/Components Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -28,15 +28,17 @@ type Props = {|
28
28
overrideValueFn ?: ?OverrideValueFn ,
29
29
showWhenEmpty ?: boolean ,
30
30
canAddEntries ?: boolean ,
31
+ canResetEntries ?: boolean ,
31
32
| } ;
32
33
33
34
export default function InspectedElementTree ( {
34
35
data,
35
36
inspectPath,
36
37
label,
37
38
overrideValueFn,
38
- canAddEntries = false ,
39
39
showWhenEmpty = false ,
40
+ canAddEntries = false ,
41
+ canResetEntries = false ,
40
42
} : Props ) {
41
43
const [ entries , setEntries ] = useState ( null ) ;
42
44
const [ entryToAdd , setEntryToAdd ] = useState ( null ) ;
@@ -115,7 +117,7 @@ export default function InspectedElementTree({
115
117
< ButtonIcon type = "add" />
116
118
</ Button >
117
119
) }
118
- { canAddEntries && (
120
+ { canResetEntries && (
119
121
< Button onClick = { handleResetEntries } title = { `Reset ${ label } ` } >
120
122
< ButtonIcon type = "undo" />
121
123
</ Button >
Original file line number Diff line number Diff line change @@ -358,6 +358,7 @@ function InspectedElementView({
358
358
overrideValueFn = { overridePropsFn }
359
359
showWhenEmpty = { true }
360
360
canAddEntries = { true }
361
+ canResetEntries = { true }
361
362
/>
362
363
{ type === ElementTypeSuspense ? (
363
364
< InspectedElementTree
You can’t perform that action at this time.
0 commit comments