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

Upload Component: disable upload and disable remove should be configured separately #27519

Closed
1 task done
shenyinabcd opened this issue Nov 3, 2020 · 1 comment · Fixed by #45752
Closed
1 task done
Labels

Comments

@shenyinabcd
Copy link

shenyinabcd commented Nov 3, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

There isn't a way to make the Upload Component that remove is enabled while upload is disabled.

Currently when Upload component is disabled, both upload and remove are disabled.

A requirement for example: one entity can hold only 5 files . If exceeds 5 files, no more files can be uploaded, but the previous files could be removed. Current situation is, in order to disable upload function, Upload should be set disabled. But when Upload is set to disabled, both upload and remove are disabled.

Why current Upload act like this. See another opposite requirement from issue history: want upload and remove are both disabled, when Upload Component is disabled. See #8677

Upload and remove should be controlled separately.

What does the proposed API look like?

idea 1:
When disabled is set, should able to remove file. The usages are:
disable upload and enable remove, use <Upload disabled>
disable both upload and remove, use <Upload disabled showUploadList={{ showRemoveIcon: false }} />

or idea 2:
<Upload disableUpload={true} disableRemove={false}>

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