-
Notifications
You must be signed in to change notification settings - Fork 63
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: set maxFiles to Infinity when setting a MultiFileReceiver #6253
Conversation
setMaxFiles(1); | ||
if (receiver instanceof MultiFileReceiver) { | ||
getElement().removeProperty("maxFiles"); | ||
getElement().executeJs("this.maxFiles = Infinity"); |
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.
Should we rather change the default value for this property in the web component?
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 discussed this internally and decided to go ahead with the current fix for now. We will consider changing the web component's default values later.
...ad-flow-parent/vaadin-upload-flow/src/main/java/com/vaadin/flow/component/upload/Upload.java
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
#6304) Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
#6303) Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
This ticket/PR has been released with Vaadin 24.5.0.alpha1 and is also targeting the upcoming stable 24.5.0 version. |
Description
Fixes an issue where the user was unable to select more than one file after switching from a single-file receiver to a multi-file one. It was because the Flow component didn't set the
maxFiles
client-side property toInfinity
– the web component's default value for that property – when a multi-file receiver was set.Fixes #6227
Type of change