Skip to content

Commit 044ff95

Browse files
committed
doc: update document. #59
1 parent 505f73e commit 044ff95

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -879,17 +879,17 @@ export interface JsonViewProps<T extends object> extends React.DetailedHTMLProps
879879
enableClipboard?: boolean;
880880
/** When set to true, all nodes will be collapsed by default. Use an integer value to collapse at a particular depth. @default false */
881881
collapsed?: boolean | number;
882+
/** 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). */
883+
shouldExpandNodeInitially?: (
884+
isExpanded: boolean,
885+
props: { value?: T; keys: (number | string)[]; level: number },
886+
) => boolean;
882887
/** Whether to highlight updates. @default true */
883888
highlightUpdates?: boolean;
884889
/** Shorten long JSON strings, Set to `0` to disable this feature @default 30 */
885890
shortenTextAfterLength?: number;
886891
/** Callback function for when a treeNode is expanded or collapsed */
887-
onExpand?: (props: {
888-
expand: boolean;
889-
value?: T;
890-
keyid: string;
891-
keyName?: string | number;
892-
}) => void;
892+
onExpand?: (props: { expand: boolean; value?: T; keyid: string; keyName?: string | number }) => void;
893893
/** Fires event when you copy */
894894
onCopied?: (text: string, value?: T) => void;
895895
}

0 commit comments

Comments
 (0)