Skip to content

Commit f9aa7b8

Browse files
committed
fix: update comments for collapsed and shouldExpandNodeInitially properties.
1 parent 87a29ec commit f9aa7b8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

core/src/index.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,17 @@ export interface JsonViewProps<T extends object>
6161
displayDataTypes?: boolean;
6262
/** The user can copy objects and arrays to clipboard by clicking on the clipboard icon. @default true */
6363
enableClipboard?: boolean;
64-
/** When set to true, all nodes will be collapsed by default. Use an integer value to collapse at a particular depth. @default false */
64+
/**
65+
* When set to true, all nodes will be collapsed by default. Use an integer value to collapse at a specific depth. @default false
66+
* collapsed takes precedence over shouldExpandNodeInitially.
67+
* @see {@link shouldExpandNodeInitially} for more details on how the initial expansion works.
68+
*/
6569
collapsed?: boolean | number;
66-
/** Determine whether the node should be expanded on the first render, or you can use collapsed to control the level of expansion (by default, the root is expanded). */
70+
/**
71+
* Determines whether the node should be expanded on the first render, or you can use collapsed to control the level of expansion (by default, the root is expanded).
72+
* If both collapsed and shouldExpandNodeInitially are set, the value of collapsed takes precedence.
73+
* @see {@link collapsed} for more details on how this works.
74+
*/
6775
shouldExpandNodeInitially?: ShouldExpandNodeInitially<T>;
6876
/** Whether to highlight updates. @default true */
6977
highlightUpdates?: boolean;

0 commit comments

Comments
 (0)