Closed sseg closed 3 years ago
I expected to be able to pass a subset of reactJsonOptions in TypeScipt, e.g.:
reactJsonOptions
<JsonField source="example" reactJsonOptions={{ name: null }} />
however the props declaration for the options is inaccurate resulting in a type-checking error:
error TS2741: Property 'src' is missing in type '{ name: null; }' but required in type 'ReactJsonViewProps'.
The upstream props get re-used here: https://github.com/MrHertal/react-admin-json-view/blob/d34b25f30effa2b6939989e443dc4f8faebb5e60/src/JsonInput.tsx#L13 and src is declared required here: https://github.com/mac-s-g/react-json-view/blob/2feadcec5e1878f4f9319a2742d51b75d519c4dc/index.d.ts#L9
src
I expected to be able to pass a subset of
reactJsonOptions
in TypeScipt, e.g.:however the props declaration for the options is inaccurate resulting in a type-checking error:
The upstream props get re-used here: https://github.com/MrHertal/react-admin-json-view/blob/d34b25f30effa2b6939989e443dc4f8faebb5e60/src/JsonInput.tsx#L13 and
src
is declared required here: https://github.com/mac-s-g/react-json-view/blob/2feadcec5e1878f4f9319a2742d51b75d519c4dc/index.d.ts#L9