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

Run validation when field is blurred #679

Merged
merged 6 commits into from
Oct 14, 2019
Merged

Conversation

jouni
Copy link
Member

@jouni jouni commented Oct 3, 2019

Fixes vaadin/vaadin-date-picker-flow#201

If you can come up with any potential side-effects of running validation on blur, that would be great to catch before merging 🤗


This change is Reviewable

@jouni
Copy link
Member Author

jouni commented Oct 4, 2019

The tests are failing at some random thing about “theme-propagation”. Doesn’t seem to be related to this change.

Test pass locally in Chrome at least.

@jouni
Copy link
Member Author

jouni commented Oct 4, 2019

One point raised by the original issue author: pressing the clear button should remove the invalid state immediately as well. Right now it is not removed, only after the user blurs the field.

@web-padawan
Copy link
Member

pressing the clear button should remove the invalid state immediately as well. Right now it is not removed, only after the user blurs the field.

Confirmed this issue. It works with vaadin-time-picker. Will update the PR accordingly.

@web-padawan web-padawan self-assigned this Oct 9, 2019
Copy link
Member

@tomivirkki tomivirkki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression:

  1. Create a required date picker
  2. Tab focus it (so that it's focused but not opened)
  3. Open the dropdown with down key
    -> The field is marked as invalid

@web-padawan web-padawan merged commit 0255184 into master Oct 14, 2019
@web-padawan web-padawan deleted the fix/validate-on-blur branch October 14, 2019 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DatePicker remains invalid after clearing its value
3 participants