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: missing displayArrayKey props in TS typings #348

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

filmstarr
Copy link

Small fix for missing displayArrayKey property in TypeScript typings, as specified in README.

@iamdushyant
Copy link

This fix isn't available in the latest package. When will it be available?

@industriousparadigm
Copy link

Hello, running into this problem as well. Hope this can be merged soon! Thanks for the nice package btw 👏

@davidpett
Copy link

This PR still hasn't been merged

@antoine-giret
Copy link

Hello, any news on this ?

@Victor-Sinitca
Copy link

I can help. I also had this problem.
This is my decision:

import ReactJson from 'react-json-view'
import { FC } from 'react'

type TReactJsonContainer = {
  data: object
}
export const ReactJsonContainer: FC<TReactJsonContainer> = ({ data }) => {  
  const props = {
    displayArrayKey: false,
    displayDataTypes: false,
    displayObjectSize: false,
    indentWidth: 2,
    name: null,
    src: data,
  } as any

  return (    
    <ReactJson
      {...props}
    />
  )
}

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.

6 participants