We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The DropZone component has an "accept" parameter, which as per https://polaris.shopify.com/components/selection-and-input/drop-zone#:~:text=string-,Allowed%20file%20types.,-type%3F, is:
accept?: string Allowed file types.
It's not clear what this string should be. Is it , separated?
,
From viewing the code, it is indeed - but it would be nice to be able to tell that from the docs.
The code defines it here: https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/DropZone/utils/index.ts#L33, as far as I can tell.
Furthermore, it seems strange that the accept function takes an array or string, but the fileAccepted function which calls it only allows string:
accept
array
string
fileAccepted
https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/DropZone/utils/index.ts#L5
The docs should clearly explain that the accept parameter is a comma separated list of accepted file types.
And/or, it should be extended to allow an array of file types.
N/A
Yes
The text was updated successfully, but these errors were encountered:
Hi! We noticed there hasn’t been activity on this issue in a while. After 30 days, it will close automatically.
If it’s still relevant, or you have updates, comment and let us know. And don’t worry, you can always re-open later if needed.
Sorry, something went wrong.
It is still relevant.
No branches or pull requests
Summary
The DropZone component has an "accept" parameter, which as per https://polaris.shopify.com/components/selection-and-input/drop-zone#:~:text=string-,Allowed%20file%20types.,-type%3F, is:
It's not clear what this string should be. Is it
,
separated?From viewing the code, it is indeed - but it would be nice to be able to tell that from the docs.
The code defines it here: https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/DropZone/utils/index.ts#L33, as far as I can tell.
Furthermore, it seems strange that the
accept
function takes anarray
orstring
, but thefileAccepted
function which calls it only allowsstring
:https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/DropZone/utils/index.ts#L5
Expected behavior
The docs should clearly explain that the accept parameter is a comma separated list of accepted file types.
And/or, it should be extended to allow an array of file types.
Actual behavior
N/A
Steps to reproduce
N/A
Are you using React components?
Yes
Polaris version number
N/A
Browser
N/A
Device
N/A
The text was updated successfully, but these errors were encountered: