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

Is it possible to make the copy-button always show on the same line? #33

Closed globetro closed 7 months ago

globetro commented 8 months ago

On slightly longer lines, the copy button will wrap to a newline which causes the rest of the JSON to shift down, which is a bit annoying to work with.

globetro commented 8 months ago

Actually I think this is a bug as your examples the copy is always on same line. I could fix it if I added display: flex to w-rjv-line

jaywcjlove commented 8 months ago

@globetro I'm not sure what the issue is; adding display: flex doesn't seem to resolve anything.

globetro commented 8 months ago

Are you having the same issue as me and display: flex didn't fix it?

jaywcjlove commented 8 months ago

@globetro I didn't find any issues. Could you provide a reproducible example for reference?

olavim commented 8 months ago

For me the issue was Next.js setting display: block for svg elements by default. Fixed by setting it to display: inline.

jaywcjlove commented 8 months ago

@olavim thx! I have reproduced this issue. upgrade v2.0.0-alpha.15 @globetro

jaywcjlove commented 8 months ago

@globetro @olavim upgrade 2.0.0-alpha.16

globetro commented 7 months ago

Thank you that fixed it!

daryllimyt commented 5 months ago

how can I fix this in V1 with tailwind+nextjs? I want to use this with the editor feature but if I'm not mistaken V2 doesn't have editor support yet.