Commit f1b2a715b314f82c275fac92bafbdbb109863761, which made the Button component enabled when type=reset || submit to support more standard form submissions, appears to have introduced a bug on the LoginForm component.
On LoginForm, passing onSubmit={undefined} no longer disables the button - which makes the button look and be clickable, which results in a javascript error.
Passing prop onSubmit={undefined} on LoginForm should disable the Button.
Button always enabled because type='submit'
Quick (and possibly dirty) fix is for LoginForm to toggle its Button type to button instead of submit when props.onSubmit is undefined.
Or, could introduce a disabled prop for Button, and pass it from the LoginForm.
I'll submit a PR for one of the above if you guys can provide a bit of feedback on approach... or another way of doing it.
thanks for proposing a fix for this. I believe for backwards compatibility sake, I would vote for changing the type of the button. Can you work on a pull request for this?
+1, this is annoying especially because if the login is taking a while, the form gives no feedback at all to the user.
I went ahead and fixed this using @alansouzati's vote. https://github.com/grommet/grommet/pull/1384
Most helpful comment
I went ahead and fixed this using @alansouzati's vote. https://github.com/grommet/grommet/pull/1384