Merge pull request #4397 from appsmithorg/perf/ui/reduce-json-view-data

[Performance] Collapse all but the first two records in react-json-view
This commit is contained in:
Satish Gandham 2021-05-21 19:32:52 +05:30 committed by GitHub
commit 516aa0f40c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,6 +216,10 @@ export const CurrentValueViewer = memo(
},
collapsed: 2,
collapseStringsAfterLength: 20,
shouldCollapse: (field: any) => {
const index = field.name * 1;
return index >= 2 ? true : false;
},
};
content = (
<ReactJson src={props.evaluatedValue} {...reactJsonProps} />