Add onExpand to types

This commit is contained in:
Ann Balina 2020-11-21 00:56:15 +02:00
parent 867a497d91
commit 045c1579cc

View File

@ -9,6 +9,7 @@ interface SharedCircularPropsPassedThroughJSONTree {
expanded: boolean, expanded: boolean,
expandable: boolean expandable: boolean
) => React.ReactNode; ) => React.ReactNode;
onExpand?: (data: any, level: number, keyPath: any[]) => void;
} }
interface SharedCircularPropsProvidedByJSONTree interface SharedCircularPropsProvidedByJSONTree
extends SharedCircularPropsPassedThroughJSONTree { extends SharedCircularPropsPassedThroughJSONTree {
@ -41,6 +42,7 @@ interface JSONNestedNodeCircularPropsPassedThroughJSONTree {
isCustomNode: (value: any) => boolean; isCustomNode: (value: any) => boolean;
collectionLimit: number; collectionLimit: number;
sortObjectKeys?: ((a: any, b: any) => number) | boolean; sortObjectKeys?: ((a: any, b: any) => number) | boolean;
onExpand?: (data: any, level: number, keyPath: any[]) => void;
} }
export type CircularPropsPassedThroughJSONTree = SharedCircularPropsPassedThroughJSONTree & export type CircularPropsPassedThroughJSONTree = SharedCircularPropsPassedThroughJSONTree &
JSONValueNodeCircularPropsPassedThroughJSONTree & JSONValueNodeCircularPropsPassedThroughJSONTree &