ngx-json-viewer icon indicating copy to clipboard operation
ngx-json-viewer copied to clipboard

Fix big objects not expandable & expanded state reset when not needed

Open GerkinDev opened this issue 5 years ago • 4 comments

This fix introduce a Set that is used to store children's expanded state. If the json property is changed with an object containing the same keys, the children's expanded state is preserved.

Angular was updated to >=8.0.0.

Tell me if you need anything to merge this PR & publish the package. For info, it works well with quite heavy objects in my project.

For people passing by, you can install my build using the following command:

npm install git+https://github.com/GerkinDev/ngx-json-viewer.git#release

:beers: Cheers !

GerkinDev avatar Nov 28 '19 17:11 GerkinDev

How does this work with duplicate keys?

benkrig avatar Nov 29 '19 19:11 benkrig

There's one set per object/array, so it can't have any duplicate keys.

GerkinDev avatar Nov 30 '19 17:11 GerkinDev

Could you please merge this pull request? :smiley: @hivivo

amarcazzo avatar Jan 02 '20 20:01 amarcazzo

Hi, this repo looks dead, what do u think about open a new fork like ngx-json-viewer2 (if I'm not wrong the MIT licence allow it) and merge those PRs on that repo?

n3wtron avatar Jun 16 '20 07:06 n3wtron