Git Product home page Git Product logo

Comments (5)

NewOldMax avatar NewOldMax commented on May 23, 2024

Hi,
You can see that event.preventDefault() is already called

from react-material-ui-form-validator.

laura-rodriguez avatar laura-rodriguez commented on May 23, 2024

Hi!

Yes, but then you have this: if (result) {this.props.onSubmit();} so the event is not passed to the props.onSubmit.

from react-material-ui-form-validator.

NewOldMax avatar NewOldMax commented on May 23, 2024

Yes, it's not passed. But if you only need to do preventDefault, you don't need to catch event.

from react-material-ui-form-validator.

laura-rodriguez avatar laura-rodriguez commented on May 23, 2024

My scenario is next (maybe I am using a wrong approach). I have a basic login form with user and password fields. User and password are two TextValidator inside a validation form, with 'required' validation. Once the user enters both inputs and press submit the server can return an error which should be displayed in the form. By now, as that logic is custom and it's passed to validatorForm as "customHandleSubmit" in onSubmit prop, I am not able to call prevent default from my customHandleSubmit, so the form is rendered again without showing the error.

from react-material-ui-form-validator.

laura-rodriguez avatar laura-rodriguez commented on May 23, 2024

Sorry, I just realized that I was having issues with the routing and with the form. Thanks for your support.

from react-material-ui-form-validator.

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.