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

feat: type event target for upload events #8627

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

sissbruecker
Copy link
Contributor

@sissbruecker sissbruecker commented Feb 3, 2025

Description

Types event.target for upload events, so that casting the target is unnecessary when trying to use the upload element in event handlers. This could be used for example to clear the files when an upload has finished using event.target.files = [].

Part of #7868

Type of change

  • Feature

Copy link

sonarqubecloud bot commented Feb 3, 2025

@vursen
Copy link
Contributor

vursen commented Feb 4, 2025

There is a ticket about this issue: #7868. Should we consider applying this approach to all components?

@sissbruecker
Copy link
Contributor Author

There is a ticket about this issue: #7868. Should we consider applying this approach to all components?

I'd say yes, but I think it's fine to do this in smaller chunks. This is inspired by a practical use case that came up in Slack, so I spent a few minutes on adding it for upload.

@sissbruecker sissbruecker merged commit 2c4de76 into main Feb 4, 2025
9 checks passed
@sissbruecker sissbruecker deleted the feat/upload-event-target-type branch February 4, 2025 07:32
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.7.0.alpha10 and is also targeting the upcoming stable 24.7.0 version.

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

Successfully merging this pull request may close these issues.

3 participants