Giter Club home page Giter Club logo

react-admin-json-view's Issues

Add a screenshot and a license

Hi, and thanks for publishing your work!

I'd be more inclined to use your library if I knew how it looks like, and what I risk by using your code...

I have some input didn't want to be delete or add.

Hi 💦
Is there any solution to control deletable and addable?
Can it work like react-json-view's demo, let enable add/delete = false then hover it'll not show icons?
螢幕快照 2021-07-14 下午21 42 16 下午

I have some input that didn't want to be delete or add.
I had tried to use onDelete or onAdd in reactJsonOptions but didn't work...

This module is awesome !

Hi @MrHertal, just installed this module and it worked straight. This is awesome, (doesn't matter if you did not do the underlying library). I just wanted to say thank you for sharing this!

JsonField text is unreadable on dark theme in React-Admin

[Issue Description]
Currently, the JsonField component in React-Admin does not handle the current theme properly. When a dark theme is set, the text within the JsonField appears black, making it extremely difficult to read. This issue affects the readability of the JsonField component, limiting its usability to only the white theme.

[Proposed Improvement]
JsonField should be updated to ensure proper handling of the current theme in React-Admin. Specifically, when a dark theme is applied, the text within the JsonField should be adjusted to a more readable color, allowing users to view the content regardless of the selected theme. This enhancement will improve the overall usability and accessibility of the JsonField component in different theme settings.

JsonField can't resolve dot notation for source parameter

What did you want to do
I wanted to pass a dot notation string to JsonField component
<JsonField source="source.nested" />

What did you expect
I expected to have my nested component displayed correctly

What happened instead
It displays "root":{}

I don't know if this a bug, a upcoming feature or a wanted behavior, but the strange thing is that I have no problem with the JsonInput component using dot notation.

reactJsonOptions props expects `src`

I expected to be able to pass a subset of reactJsonOptions in TypeScipt, e.g.:

 <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:

reactJsonOptions?: ReactJsonViewProps;

and src is declared required here: https://github.com/mac-s-g/react-json-view/blob/2feadcec5e1878f4f9319a2742d51b75d519c4dc/index.d.ts#L9

Supported nested objects in field & input source with dotted notation

I have a nested object in my record, like this:

{
  id: "abcdef",
  info: {
    tree: {
       x: 1,
       y: 2
    }
  }
}

Now if I use the JSON view components and put source="info.tree" it doesn't work as the component looks for record[source]. The React Admin native fields and inputs use lodash to resolve nested location:

import get from 'lodash/get';
...
const value = get(record, source);

Could you incorporate this into the field and input?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.