Skip to content

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