Yuvaleros/material-ui-dropzone

Unable to press submit button once all the files are deleted

sanals opened this issue · 2 comments

Steps to reproduce the behavior:

  1. Create a DropzoneDialog
  2. Add few images and save them to database. Load them back again to DropzoneDialog when reopening for editing(adding /removing).
  3. Remove all images. I am not able to click submit button for DropzoneDialog, because its disabled and not able to re-enable it.

ezgif com-crop

Hi @sanals ,

The described behaviour is actually the expected one for this module since it should be used as an Input and not as a file management component.

Can we reopen this issue? Not being able to submit is not expected behaviour.

I have a usecase where whatever the user does inside the modal is just temporary, and in order for the data to actually pass to the form, they need to click on the Submit button.

The user can later reopen the modal in case they want to remove one (or all) of the files and upload different ones.

Not being able to click the button once all the files have been removed effectively forbids the user to edit his uploaded files. And if it's supposed to be used as an input, then what purpose does the "Cancel" button serve?

@panz3r