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

Border-lines are malfunctioning in the facility creation page #4394

Closed
nihal467 opened this issue Dec 24, 2022 · 4 comments · Fixed by #4401
Closed

Border-lines are malfunctioning in the facility creation page #4394

nihal467 opened this issue Dec 24, 2022 · 4 comments · Fixed by #4401
Assignees

Comments

@nihal467
Copy link
Member

Describe the bug

When we are opening the facility creation page, by default, some field borderlines are red.

To Reproduce

https://care.coronasafe.in/facility/create

Expected behavior

red borderline should only be shown when there is an error by the user.

Screenshots

image

@Ashesh3 Ashesh3 self-assigned this Dec 24, 2022
@rithviknishad
Copy link
Member

@Ashesh3 can you remove the invalid:border-danger-500 from cui-input-base class?

I added it to make required fields error out if it's invalid / empty.

or is there a way to not validate the input until the element got focus or something?

@Ashesh3
Copy link
Member

Ashesh3 commented Dec 24, 2022

or is there a way to not validate the input until the element got focus or something?

@rithviknishad I am afraid that'd require additional JS to keep a watch for the initial focus, how about we keep the existing behavior where the fields will only be validated after a form submission?

cc: @nihal467

@rithviknishad
Copy link
Member

I thought there was something like (HTML way) since it's pretty common behaviour in other websites to not validate until focus.

Additional JS, I also wouldn't proceed 😅

@Ashesh3
Copy link
Member

Ashesh3 commented Dec 24, 2022

I thought there was something like (HTML way) since it's pretty common behaviour in other websites to not validate until focus.

Additional JS, I also wouldn't proceed 😅

I am personally not aware of any such method, tried asking OpenAI too 😬 .
image

So, I guess we'll have to keep the existing behavior in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants