-
Notifications
You must be signed in to change notification settings - Fork 7
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
Clears input field. #22
Clears input field. #22
Conversation
It clears the minutes' input field after a successful HTTP request.
Someone is attempting to deploy a commit to a Personal Account owned by @ats1999 on Vercel. @ats1999 first needs to authorize it. |
@ats1999 Please review and let me know if any changes are required, thanks! |
@@ -29,6 +30,8 @@ export default function BackDate() { | |||
}) | |||
.then((res) => { | |||
alert("Updated successfully"); | |||
minutesInputRef.current.value = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check, current.value
should be a number or string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ats1999 If I set current.value
to a number then it will show that number instead of a blank field, so used ''
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great man
@@ -29,6 +30,8 @@ export default function BackDate() { | |||
}) | |||
.then((res) => { | |||
alert("Updated successfully"); | |||
minutesInputRef.current.value = ''; | |||
setTime(''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure that time value can be a string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ats1999 to set the current field as empty I set the value to be the empty string. It also disables the submit button when the value is empty string enforcing the user to set any other value to submit the form.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okey, i am approving the changes.
Thanks for contribution
It clears the minutes' input field after a successful HTTP request.
#19 Fixes.