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

fix(FileUploader): respect multiple prop in default file uploader #5492

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Feb 28, 2020

Closes #2537

This PR will restrict the file list to 1 file if the multiple prop is false in the default file uploader

Changelog

Changed

  • internal file list is replaced instead of concatenated when multiple is false

Testing / Reviewing

Ensure only one file is listed when multiple is false in default file uploader

@emyarod emyarod requested a review from a team as a code owner February 28, 2020 22:50
@ghost ghost requested review from aledavila and dakahn February 28, 2020 22:50
Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 - Thanks @emyarod!

@netlify
Copy link

netlify bot commented Feb 28, 2020

Deploy preview for carbon-elements failed.

Built with commit 9604d7e

https://app.netlify.com/sites/carbon-elements/deploys/5e5ee2e5d9971c0009bb951f

@netlify
Copy link

netlify bot commented Feb 28, 2020

Deploy preview for carbon-components-react ready!

Built with commit 9604d7e

https://deploy-preview-5492--carbon-components-react.netlify.com

@abbeyhrt
Copy link
Contributor

abbeyhrt commented Mar 2, 2020

Should this address the drag and drop variant as well? It seems to have the multiple prop but I can still select multiple if it is set false.

@emyarod
Copy link
Member Author

emyarod commented Mar 2, 2020

the drag and drop file uploader does not control the file list* so it doesn't have this issue out of the box. but I can update the example application to match this behavior

Copy link
Contributor

@abbeyhrt abbeyhrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

@emyarod emyarod force-pushed the 2537-default-fileuploader-multiple-prop branch from aa88a09 to 6d3f935 Compare March 3, 2020 18:19
@asudoh asudoh merged commit 0e10c10 into carbon-design-system:master Mar 3, 2020
@emyarod emyarod deleted the 2537-default-fileuploader-multiple-prop branch March 4, 2020 21:05
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.

Fileuploader component: Multiple prop set to false but all selected files are accepted.
6 participants