Skip to content

Commit 32bac9e

Browse files
authored
Added <KeyValue> tree back to complex hooks.
Only show meta label when collapsed.
1 parent ee3a74f commit 32bac9e

File tree

1 file changed

+10
-1
lines changed
  • packages/react-devtools-shared/src/devtools/views/Components

1 file changed

+10
-1
lines changed

packages/react-devtools-shared/src/devtools/views/Components/HooksTree.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,19 @@ function HookView({canEditHooks, hook, id, inspectPath, path}: HookViewProps) {
203203
{name || 'Anonymous'}
204204
</span>
205205
<span className={styles.Value} onClick={toggleIsOpen}>
206-
{getMetaValueLabel(value)}
206+
{isOpen || getMetaValueLabel(value)}
207207
</span>
208208
</div>
209209
<div className={styles.Children} hidden={!isOpen}>
210+
<KeyValue
211+
depth={1}
212+
alphaSort={false}
213+
inspectPath={inspectPath}
214+
name="DebugValue"
215+
path={path.concat(['value'])}
216+
pathRoot="hooks"
217+
value={value}
218+
/>
210219
{subHooksView}
211220
</div>
212221
</div>

0 commit comments

Comments
 (0)