react-json-view
react-json-view copied to clipboard
fix: missing displayArrayKey props in TS typings
Small fix for missing displayArrayKey property in TypeScript typings, as specified in README.
This fix isn't available in the latest package. When will it be available?
Hello, running into this problem as well. Hope this can be merged soon! Thanks for the nice package btw 👏
This PR still hasn't been merged
Hello, any news on this ?
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}
/>
)
}