-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Description
When using the option noQuotesForStringValues, you are able to add your own quotes via CSS.
However, empty strings still have quotes added due to this line:
react-json-view-lite/src/DataRenderer.tsx
Line 49 in c8cca33
| return !value || quoted ? `"${value}"` : value; |
... which looks ok-ish without CSS quotes, but just wrong with CSS add
⚠️ noQuotesForStringValues: true
This is my version with CSS quotes:

It can even be replicated in Storybook (via controls):

ed.
✅ noQuotesForStringValues: false
This looks fine, if no CSS are added:

Can the check
!valuebe changed into a more precise one with better handling of empty strings or should empty strings appear differently? I could create a PR, if the change would be fine.
Metadata
Metadata
Assignees
Labels
No labels