-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat: add internal has-input-value-changed event #4276
Conversation
Co-authored-by: Serhii Kulykov <[email protected]>
fe0061c
to
0b93276
Compare
* @private | ||
*/ | ||
_hasInputValueChanged() { | ||
this.dispatchEvent(new CustomEvent('has-input-value-changed')); |
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'm wondering if the event should contain the value.. this would allow to let the server parse the value and react differently depending on the 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.
We were considering this option.
Conclusion was that parsing logic for the value is already implemented for the component. This is for the cases when the value cannot be parsed, but flow counterpart should still be aware if there is some arbitrary content in the input field. (An example would be qwerty
string in date-picker
)
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.
This reminded me of another feature request, where today
would be send to the server in this case and the server can parse it, like it was possible with V8. That why I wanted to mention it.
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.
You are right, that's a valid point, but that feature should be tackled separately (not in scope of this PR).
Related ticket: vaadin/flow-components#2466
Co-authored-by: Serhii Kulykov <[email protected]>
Kudos, SonarCloud Quality Gate passed!
|
Introduce
__inputValuePopulated
property andinput-value-populated-changed
event which will be used from the Flow counter-part.Needed for the cases when value is not synced with the flow counter-part because of type differences. For example, in case of date-picker flow counterpart is not notified about inputing arbitrary string
qwerty
therefore it cannot be properly validated.Event is not documented on purpose as intended for internal use.
Related: vaadin/flow-components#3524.
Related vaadin/platform#3066