Skip to content

Commit

Permalink
Added <KeyValue> tree back to complex hooks.
Browse files Browse the repository at this point in the history
Only show meta label when collapsed.
  • Loading branch information
bvaughn authored Mar 17, 2020
1 parent ee3a74f commit 32bac9e
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,19 @@ function HookView({canEditHooks, hook, id, inspectPath, path}: HookViewProps) {
{name || 'Anonymous'}
</span>
<span className={styles.Value} onClick={toggleIsOpen}>
{getMetaValueLabel(value)}
{isOpen || getMetaValueLabel(value)}
</span>
</div>
<div className={styles.Children} hidden={!isOpen}>
<KeyValue
depth={1}
alphaSort={false}
inspectPath={inspectPath}
name="DebugValue"
path={path.concat(['value'])}
pathRoot="hooks"
value={value}
/>
{subHooksView}
</div>
</div>
Expand Down

0 comments on commit 32bac9e

Please sign in to comment.