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
fix: fields should not remove initially set invalid status on ready #418
Conversation
Update "alignment" visual test screenshots to match proper behaviour once this has been merged and released: vaadin/vaadin-text-field#418 Update out of date visual test screenshot: "form-layout" (material, Firefox) which doesn't seem to have any noticeable change, but was failing.
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.
I have some concerns related to the suggested change:
-
If we are sure that
_constraintsChanged
observer needs to be called afterready
, it makes sense to initialise it onready()
rather than inconstructor()
. Then we don't need a flag. -
I agree with the statement from fix: stuck in invalid state after last validation constraint is removed while invalid #401 (comment) regarding the observer:
(could be extended by numberfield if -mixin shouldn't know about min, max, step):
Please see c21b64b for solution taking these into account (split-constrains-observer branch).
@web-padawan Great solution, thanks! I was initially trying to do something similar but I couldn't figure out a way to override the observer defined in a superclass. I didn't think of creating it in another (overridable) method and calling it in I fast-forwarded this PR branch to contain your changes as is. |
This needs to be cherry-picked to |
Cherry-picked to 2.4 and released as v2.4.12 |
Update "alignment" visual test screenshots to match proper behaviour once this has been merged and released: vaadin/vaadin-text-field#418 Update out of date visual test screenshot: "form-layout" (material, Firefox) which doesn't seem to have any noticeable change, but was failing.
Fixes #417.