Code Monkey home page Code Monkey logo

Comments (6)

zzph avatar zzph commented on June 11, 2024

Any ideas on this? I'm blocked from using this awesome library because of it

from react-jsonschema-form.

heath-freenome avatar heath-freenome commented on June 11, 2024

The widget has access to the formData at its current level (in your example the widget will get the value for name) via the value prop. Is there a reason why you need access to all of the formData within a single widget?

from react-jsonschema-form.

zzph avatar zzph commented on June 11, 2024

from react-jsonschema-form.

heath-freenome avatar heath-freenome commented on June 11, 2024

@zzph I'm wondering if the "freezing" of the form you are seeing is a situation where your the state change causes a rerender infinite loop. Theoretically, you should be able to put anything into the formContext. Have you debugged why you things are freezing?

from react-jsonschema-form.

zzph avatar zzph commented on June 11, 2024

Yes I've debugged, and it does seem like you're saying- it re-renders the entire component everytime 'formContext' changes. So this is an issue.

Can you suggest a work around?

from react-jsonschema-form.

heath-freenome avatar heath-freenome commented on June 11, 2024

Maybe you can process the formData on change in a way that you transform what you put into the formContext is only what you need to provide the auto-suggest? Meaning if your component looks at the value of age to auto-suggest the value of name (from your example), perhaps precompute the suggestion OUTSIDE of the component and pass in the suggestion rather than the formData in the formContext?

from react-jsonschema-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.