uiwjs / react-json-view

A React component for displaying and editing javascript arrays and JSON objects.
https://uiwjs.github.io/react-json-view/
MIT License
212 stars 12 forks source link

Bug: shortenTextAfterLength isn't adhering to provided prop #15

Open CamdenFoucht opened 1 year ago

CamdenFoucht commented 1 year ago

Hello,

I was testing the new shortenTextAfterLength prop and it seems to always use 20 even when a custom length such as 200 is being provided.

I also tried using 0 to disable the feature, and seems it was still shortening text to the default of 20

Also could the default be made higher? I think 20 is slightly too short, I think 80 or 100 would be a better default value for this property 🙂

jaywcjlove commented 1 year ago

@CamdenFoucht Upgrade v2.0.0-alpha.6

jaywcjlove commented 1 year ago

If it is v1 version, you can upgrade to v1.12.1 @CamdenFoucht

jaywcjlove commented 1 year ago

https://codesandbox.io/embed/romantic-leftpad-jtqx56?fontsize=14&hidenavigation=1&theme=dark