Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Do not render ellipses when the number of items is 0 #48

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

korkt-kim
Copy link
Contributor

import JsonView from '@uiw/react-json-view';

const example = [
  {
    "a":[],
    "b":{},
    "c":['c1','c2'],
    "d":{d1:1,d2:2}
  },
]

export default function App() {
  return (
    <JsonView 
      value={example} 
      collapsed={2}
    >
    </JsonView>
  );
}

Ellipsis is being rendered on aand b even though their values are empty

@jaywcjlove jaywcjlove merged commit 6902b8f into uiwjs:main Apr 16, 2024
github-actions bot pushed a commit that referenced this pull request Apr 16, 2024
Co-authored-by: NZ10387 <nz10387@naverz-corp.com> 6902b8f
jaywcjlove added a commit that referenced this pull request Apr 16, 2024
@jaywcjlove
Copy link
Member

@korkt-kim thx! upgrade v2.0.0-alpha.24

github-actions bot pushed a commit that referenced this pull request Apr 16, 2024
@korkt-kim korkt-kim deleted the fix-ellipsis branch April 24, 2024 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants