-
Notifications
You must be signed in to change notification settings - Fork 15
[Proposal] Add type property for Button component #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Probably, a My current thoughts: to make it work both when our Also, if we use Redux, using such option seems to be a cheat to me, as it avoids using Redux action. But, yeah, we still can provide such option. |
Just in my opinion To clarify, it's not enough to handle Regarding Redux, we are not encorouged to cheat here, as we can call the same Redux action on form submit: <form onSubmit={(evt) => {
evt.preventDefault();
dispatch(getReduxAction());
}}>
<input type="text" /> // we press Enter in this field
<Button type="submit">Submit</Button>
</form> PS. Only downside of having |
Okay, I was saying wrong stuff :) |
It can be useful to be able to set property
type
forButton
component.For example adding
type="submit"
for buttons enables automatic form submittion when we press<Enter>
in a form field.The text was updated successfully, but these errors were encountered: