-
Notifications
You must be signed in to change notification settings - Fork 83
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 type definitions for change event #3085
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
Looks good.
We might consider updating all the other custom events to have type for target separately later.
That would have been my only concern. There is probably an opportunity to add a base event type per component, and use that for all custom events. But I'm not sure if all custom events actually have the host element set as target.
Maybe there is also a language construct where you can modify the value types of HTMLElementEventMap
to override the target property 🤔
Yes, technically they do. I will create a separate issue as a follow-up and we probably can do that in V23. |
Hi @web-padawan , this commit cannot be picked to 22.0 by this bot, can you take a look and pick it manually? |
We probably should not pick this to Vaadin 22 as we are about to have a release candidate today. |
This ticket/PR has been released with platform 23.0.0. |
Description
The main idea behind this improvement is providing a type for
target
property of thechange
event object.This is especially important because typically inside a change event listener users check
event.target.value
.We might consider updating all the other custom events to have type for
target
separately later.Fixes #3040
Type of change