Skip to content

Commit 13a9992

Browse files
committed
fix: complex debug values not showing in collapsed state
1 parent c831387 commit 13a9992

File tree

1 file changed

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

1 file changed

+4
-10
lines changed

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import EditableValue from './EditableValue';
1717
import ExpandCollapseToggle from './ExpandCollapseToggle';
1818
import {InspectedElementContext} from './InspectedElementContext';
1919
import KeyValue from './KeyValue';
20-
import {serializeHooksForCopy} from '../utils';
20+
import {getMetaValueLabel, serializeHooksForCopy} from '../utils';
2121
import styles from './HooksTree.css';
2222
import useContextMenu from '../../ContextMenu/useContextMenu';
2323
import {meta} from '../../../hydration';
@@ -202,17 +202,11 @@ function HookView({canEditHooks, hook, id, inspectPath, path}: HookViewProps) {
202202
className={name !== '' ? styles.Name : styles.NameAnonymous}>
203203
{name || 'Anonymous'}
204204
</span>
205+
<span className={styles.Value} onClick={toggleIsOpen}>
206+
{getMetaValueLabel(value)}
207+
</span>
205208
</div>
206209
<div className={styles.Children} hidden={!isOpen}>
207-
<KeyValue
208-
depth={1}
209-
alphaSort={false}
210-
inspectPath={inspectPath}
211-
name="DebugValue"
212-
path={path.concat(['value'])}
213-
pathRoot="hooks"
214-
value={value}
215-
/>
216210
{subHooksView}
217211
</div>
218212
</div>

0 commit comments

Comments
 (0)