mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-27 00:19:55 +03:00
update prop types to allow for optional _circularCache_ and _expandable_ props for JSONNestedNode
This commit is contained in:
parent
9c00bdd573
commit
ed9cb23e41
|
@ -42,7 +42,7 @@ function renderChildNodes(
|
||||||
nodeType,
|
nodeType,
|
||||||
data,
|
data,
|
||||||
collectionLimit,
|
collectionLimit,
|
||||||
circularCache,
|
circularCache = [],
|
||||||
keyPath,
|
keyPath,
|
||||||
postprocessValue,
|
postprocessValue,
|
||||||
sortObjectKeys,
|
sortObjectKeys,
|
||||||
|
@ -94,10 +94,12 @@ interface Props extends CircularPropsPassedThroughJSONNestedNode {
|
||||||
nodeType: string;
|
nodeType: string;
|
||||||
nodeTypeIndicator: string;
|
nodeTypeIndicator: string;
|
||||||
createItemString: (data: any, collectionLimit: number) => string;
|
createItemString: (data: any, collectionLimit: number) => string;
|
||||||
expandable: boolean;
|
expandable?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function JSONNestedNode(props: Props) {
|
export default function JSONNestedNode(props: Props) {
|
||||||
|
props.circularCache ??= [];
|
||||||
|
|
||||||
const {
|
const {
|
||||||
getItemString,
|
getItemString,
|
||||||
nodeTypeIndicator,
|
nodeTypeIndicator,
|
||||||
|
@ -128,7 +130,7 @@ export default function JSONNestedNode(props: Props) {
|
||||||
|
|
||||||
const renderedChildren =
|
const renderedChildren =
|
||||||
expanded || (hideRoot && props.level === 0)
|
expanded || (hideRoot && props.level === 0)
|
||||||
? renderChildNodes({ ...props, level: props.level + 1 })
|
? renderChildNodes({ ...props, level: level + 1 })
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
const itemType = (
|
const itemType = (
|
||||||
|
|
|
@ -60,22 +60,17 @@ export type CircularPropsPassedThroughJSONNode =
|
||||||
JSONValueNodeCircularPropsPassedThroughJSONTree &
|
JSONValueNodeCircularPropsPassedThroughJSONTree &
|
||||||
JSONNestedNodeCircularPropsPassedThroughJSONNode;
|
JSONNestedNodeCircularPropsPassedThroughJSONNode;
|
||||||
|
|
||||||
export interface JSONNestedNodeCircularPropsPassedThroughJSONNestedNode
|
|
||||||
extends JSONNestedNodeCircularPropsPassedThroughJSONNode {
|
|
||||||
circularCache: any[];
|
|
||||||
level: number;
|
|
||||||
}
|
|
||||||
export type CircularPropsPassedThroughJSONNestedNode =
|
export type CircularPropsPassedThroughJSONNestedNode =
|
||||||
SharedCircularPropsProvidedByJSONTree &
|
SharedCircularPropsProvidedByJSONTree &
|
||||||
JSONValueNodeCircularPropsPassedThroughJSONTree &
|
JSONValueNodeCircularPropsPassedThroughJSONTree &
|
||||||
JSONNestedNodeCircularPropsPassedThroughJSONNestedNode;
|
JSONNestedNodeCircularPropsPassedThroughJSONNode;
|
||||||
|
|
||||||
export type CircularPropsPassedThroughRenderChildNodes =
|
export type CircularPropsPassedThroughRenderChildNodes =
|
||||||
SharedCircularPropsProvidedByJSONTree &
|
SharedCircularPropsProvidedByJSONTree &
|
||||||
JSONValueNodeCircularPropsPassedThroughJSONTree &
|
JSONValueNodeCircularPropsPassedThroughJSONTree &
|
||||||
JSONNestedNodeCircularPropsPassedThroughJSONNestedNode;
|
JSONNestedNodeCircularPropsPassedThroughJSONNode;
|
||||||
|
|
||||||
export type CircularPropsPassedThroughItemRange =
|
export type CircularPropsPassedThroughItemRange =
|
||||||
SharedCircularPropsProvidedByJSONTree &
|
SharedCircularPropsProvidedByJSONTree &
|
||||||
JSONValueNodeCircularPropsPassedThroughJSONTree &
|
JSONValueNodeCircularPropsPassedThroughJSONTree &
|
||||||
JSONNestedNodeCircularPropsPassedThroughJSONNestedNode;
|
JSONNestedNodeCircularPropsPassedThroughJSONNode;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user