Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Submit on Enter key press #46

Closed
hnhegde opened this issue Nov 1, 2019 · 3 comments
Closed

Submit on Enter key press #46

hnhegde opened this issue Nov 1, 2019 · 3 comments

Comments

@hnhegde
Copy link
Contributor

hnhegde commented Nov 1, 2019

Hello,
While EdiText is a great component, it would be good to submit on Enter key press. If its possible already, would be great to include it in the examples.

Thanks,
Harsha

@alioguzhan
Copy link
Owner

Hey, I just released a new version includes a new prop submitOnEnter. Can you please check it here:

https://alioguzhan.github.io/react-editext/#submit-on-enter

@alioguzhan alioguzhan reopened this Nov 1, 2019
@hnhegde
Copy link
Contributor Author

hnhegde commented Nov 2, 2019

Hi @alioguzhan ,
Thanks for taking up my ask and making it available! Works great!
Regards,
Harsha

@hnhegde hnhegde closed this as completed Nov 2, 2019
@bo0tzz
Copy link

bo0tzz commented Nov 21, 2019

Hi,
This feature is awesome, however when the EdiText field is used inside a <form>, pressing enter submits the whole form. Would it be possible to prevent this, for example by binding the keypress event listener to the field instead of to window, and calling event.preventDefault()?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants