Skip to content
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

Auto focus on login field,Show a warning then inputs are empty has been fixed #10

Closed
wants to merge 3 commits into from
Closed

Conversation

iam-hitesh
Copy link

Your both issues auto-focus and show warning if username and password are empty is fixed.

@felipemarinho97
Copy link
Owner

Thank you for your contribution @ihiteish !

It's not safe to use document.getElementById in React, to solve this problem, you can just use refs.

Also, to displaying the warnings without use of document.getElementById is supported by the Ant Design, and can be done like these:
https://ant.design/components/form/#components-form-demo-register

API: https://ant.design/components/form/#Form.Item

@iam-hitesh
Copy link
Author

Hey Thanx for your review, I am a newbie here.
and I added autofocus using refs.

@iam-hitesh iam-hitesh closed this Oct 26, 2018
@felipemarinho97 felipemarinho97 added the invalid This doesn't seem right label Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants