-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(FileUploaderDropContainer): pass through empty accept
attr
#4681
fix(FileUploaderDropContainer): pass through empty accept
attr
#4681
Conversation
Deploy preview for the-carbon-components ready! Built with commit d4297c3 https://deploy-preview-4681--the-carbon-components.netlify.com |
Deploy preview for carbon-elements ready! Built with commit d4297c3 |
Deploy preview for carbon-components-react ready! Built with commit d4297c3 https://deploy-preview-4681--carbon-components-react.netlify.com |
Deploy preview for the-carbon-components ready! Built with commit 19ac3d5 https://deploy-preview-4681--the-carbon-components.netlify.com |
Deploy preview for carbon-elements ready! Built with commit 19ac3d5 |
Deploy preview for carbon-components-react ready! Built with commit 19ac3d5 https://deploy-preview-4681--carbon-components-react.netlify.com |
bit confused did empty accept ever work? if so when was it changed? |
this PR only affects drag and drop behavior. currently the mime types in |
@emyarod thanks for the clarity :) |
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.
LGTM 👍 - Thanks @emyarod!
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.
Seems great, any chance we need to add a test for this or should be good?
sure I can look into that |
Closes #4519
Previously if the user did not supply any file type restrictions, the resulting validated files array would be empty. This PR adds a check for empty
accept
attribute on drop events to pass through drag and dropped files when theaccept
attribute is not specifiedThis PR also adds a code sandbox example application using the dnd uploader
Changelog
New
Changed
accept
prop check invalidateFiles
methodmax-width
rule to drop container label to fix a visual bug where the focus outline extended past the drop areaTesting / Reviewing
accept
knob value in storybook