Coder Social home page Coder Social logo

Comments (4)

erikras avatar erikras commented on June 18, 2024 2

You can now update non-registered fields in [email protected].

from final-form-calculate.

greeksolid avatar greeksolid commented on June 18, 2024 1

@alexjsdev I had similar requirements with you (change value of a related field that is rendered on another step of a wizard form). An ugly way I found to get around this problem is to declare a field with the same name as the one I wanted to change, in the container component of the wizard so final-form-calculate can see it as a registered field and change its value.

example : <Field name="fieldYouWantToChange" component={() => null} />

I have not yet noticed any problems with this except ugly hacky code.

from final-form-calculate.

617dev avatar 617dev commented on June 18, 2024

@erikras I don't mean to bug you, but i'd love to help if you'd accept a PR for this, but could you point me in the right direction? I really need this functionality...

If i'm not taking the right approach, what am I missing? is there a better way to accomplish what i need to do?

from final-form-calculate.

erikras avatar erikras commented on June 18, 2024

It can also be done in bulk with something like this. final-form/final-form#102 (comment)

However, having thought about why I chose to not allow changes to non-registered fields, I cannot defend the decision. It makes the library less flexible. So I'm going to reverse that decision.

from final-form-calculate.

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.