Fixed Label Rendering callback in react-json-tree

This commit is contained in:
Zain Afzal
2019-01-29 08:02:34 +11:00
committed by zainafzal08
parent 600f91ec2b
commit 18d3e314ea
+3 -2
View File
@@ -1,6 +1,7 @@
// Type definitions for react-json-tree v0.6.5
// Type definitions for react-json-tree v0.6.6
// Project: https://github.com/alexkuz/react-json-tree/
// Definitions by: Grant Nestor <https://github.com/gnestor>
// Zain Afzal <https://github.com/zainafzal08>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -18,7 +19,7 @@ export interface JSONTreeProps extends Props<JSONTreeComponent> {
sortObjectKeys?: Function | boolean;
shouldExpandNode?: (keyPath: (string | number)[], data: [any] | {}, level: number) => boolean;
getItemString?: (type: string, data: [any] | {}, itemType: string, itemString: string) => JSX.Element;
labelRenderer?: (raw: [string, string]) => JSX.Element;
labelRenderer?: (keyPath: string[], nodeType: string, expanded: boolean, expandable: boolean) => JSX.Element;
valueRenderer?: (displayValue: string|number, rawValue?: string|number|boolean|null, ...keyPath: (string|number)[]) => JSX.Element;
postprocessValue?: (raw: string) => JSX.Element;
isCustomNode?: () => boolean;