Giter VIP home page Giter VIP logo

Comments (3)

titusfx avatar titusfx commented on May 26, 2024

Are you the only person maintaining this project? Looking this issue that you open I will suggest doing something general to components. In that way you don't need to keep up with new widgets.
For instance: here you explain how to do a custom widget and your interface widget is too simple may be need some change to support multiples inputs values and outputs (or values changes/events). I think a good one could be a native, that has events, and can be extended easily maybe a webcomponent directly.

Once that is defined, you could add angular components without caring where it comes, in this case could be the same path that we use on typescript files with import using that path as identifier.

from json-schema-form.

aeberhart avatar aeberhart commented on May 26, 2024

Thanks for your suggestion. You are right that the custom widget mechanism does not support all functionality yet. Specifically, when the JSON value is changed outside, the component does not pick up the change (can be tested by using the custom example on the playground and changing the value in the textfield). Also, the validation does not work if the custom component "owns" more than a single value. I opened an issue for this (#46).

In the WidgetComponent interface, actually, valueChange is an output and all others are inputs. I didn't add the Input / Output annotations because I have to use the dynamic component loader (https://angular.io/guide/dynamic-component-loader). This is where the inputs are passed and the output event is forwarded:

I'll also try to add a better / more meaningful example and document the component interaction better.

Does this make sense or am I missing something?

from json-schema-form.

aeberhart avatar aeberhart commented on May 26, 2024

first version. some restrictions do apply (no autocomplete, no format validation, no styling of the input component)

from json-schema-form.

Related Issues (20)

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.