You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
Currently, the showUploadList's removeIcon and downloadIcon properties only support passing in a single ReactNode that represents the same icon used for every item. However, there are commonly situations where certain items on a list cannot be deleted. Currently there is no way for the end user to know whether an item can be removed without first clicking the remove button and receiving an error at that time. If, instead, these could be callbacks of the form (file: File) => ReactNode, then these icons can be selectively changed or hidden as appropriate for each item. This will provide a much better user experience by clearly indicating which items are "removable" or "downloadable" without having to just try each one.
What does the proposed API look like?
The showUploadList property of the component will change from:
What problem does this feature solve?
Currently, the showUploadList's removeIcon and downloadIcon properties only support passing in a single ReactNode that represents the same icon used for every item. However, there are commonly situations where certain items on a list cannot be deleted. Currently there is no way for the end user to know whether an item can be removed without first clicking the remove button and receiving an error at that time. If, instead, these could be callbacks of the form (file: File) => ReactNode, then these icons can be selectively changed or hidden as appropriate for each item. This will provide a much better user experience by clearly indicating which items are "removable" or "downloadable" without having to just try each one.
What does the proposed API look like?
The showUploadList property of the component will change from:
boolean | { showPreviewIcon?: boolean, showDownloadIcon?: boolean, showRemoveIcon?: boolean, removeIcon?: React.ReactNode, downloadIcon?: React.ReactNode }
to:
boolean | { showPreviewIcon?: boolean, showDownloadIcon?: boolean, showRemoveIcon?: boolean, removeIcon?: React.ReactNode | (file: File) => React.ReactNode, downloadIcon?: React.ReactNode | (file: File) => React.ReactNode }
The text was updated successfully, but these errors were encountered: