diff --git a/src/devtools/views/Components/HooksTree.js b/src/devtools/views/Components/HooksTree.js index ac6dee5ea1..81c19f650e 100644 --- a/src/devtools/views/Components/HooksTree.js +++ b/src/devtools/views/Components/HooksTree.js @@ -134,16 +134,14 @@ function HookView({ canEditHooks, hook, id, path = [] }: HookViewProps) { {name} - {isOpen && ( -
- - -
- )} + ); } else { @@ -157,15 +155,13 @@ function HookView({ canEditHooks, hook, id, path = [] }: HookViewProps) { {/* $FlowFixMe */} {displayValue} - {isOpen && ( -
- -
- )} + ); } diff --git a/src/devtools/views/Components/KeyValue.css b/src/devtools/views/Components/KeyValue.css index 892bee1a39..08230f57ac 100644 --- a/src/devtools/views/Components/KeyValue.css +++ b/src/devtools/views/Components/KeyValue.css @@ -1,4 +1,4 @@ -.Item { +.Item:not([hidden]) { display: flex; } diff --git a/src/devtools/views/Components/KeyValue.js b/src/devtools/views/Components/KeyValue.js index cfcb04cc70..955514de0d 100644 --- a/src/devtools/views/Components/KeyValue.js +++ b/src/devtools/views/Components/KeyValue.js @@ -12,6 +12,7 @@ type OverrideValueFn = (path: Array, value: any) => void; type KeyValueProps = {| depth: number, + hidden?: boolean, name: string, overrideValueFn?: ?OverrideValueFn, path?: Array, @@ -20,6 +21,7 @@ type KeyValueProps = {| export default function KeyValue({ depth, + hidden, name, overrideValueFn, path = [], @@ -60,7 +62,7 @@ export default function KeyValue({ typeof overrideValueFn === 'function' ? styles.EditableName : styles.Name; children = ( -
+