Giter Club home page Giter Club logo

Comments (6)

joepuzzo avatar joepuzzo commented on June 6, 2024 2

Ok so im adding it lol

from informed.

joepuzzo avatar joepuzzo commented on June 6, 2024

So Async Validation is something that caused the codebase to get very complex and out of hand. So i have been putting a lot of thought into this. I have an idea for this to keep things clean and simple since people implement async stuff in many different ways and have all sorts of needs. So here it is:

I want to simply add a lock() and unlock() function to the formApi. This will not allow the form to get locked so it can not try to submit while locked. Then a developer can chose to tie into whatever lifecycle hooks informed provides, such as onChange or onBlur. And they can asynchronously do what they need to and set an error before unlocking the form.

Note: when i design this i would design it such that if you called lock() more than once than you would need to call unlock() that same amount of times.

Also i would add a hook inside of informed that would also call a final beforeOnSubmit function so you could lock it before it submits and perform one final submission.

from informed.

joepuzzo avatar joepuzzo commented on June 6, 2024

Also im speaking off the cuff here ^^ i have not fully figured it out yet

from informed.

m1ch34lj0hns0n avatar m1ch34lj0hns0n commented on June 6, 2024

Thanks for the response Joe, I've managed to hack my way around this issue using callbacks for the time being. Looking forward to seeing your solution.

from informed.

joepuzzo avatar joepuzzo commented on June 6, 2024

Cool i think i will leave this issue open until i do.

from informed.

joepuzzo avatar joepuzzo commented on June 6, 2024

Its in!! Go check out the docs

from informed.

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.