Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: MDBFileUpload how to detect click event for Remove button

clickstudioltd priority asked 2 years ago


Expected behavior

Be able to intercept click event for Remove button, so we can know when the user wants to delete an existing file like an already uploaded profile picture, and therefore pass a parameter to the server server side upon submit.

Actual behavior

  1. I wish there was a method like onRemoveClick or even a reference to the Remove button to alleviate this issue, but there is none.
  2. Right now, the only way that we can know Remove is clicked is by getInputFiles method which only gets called when you have chosen a file via the component itself and not when you have a defaultFile already in place. This method also gets called twice with an empty array passed to it upon first visit to the page, probably due to a rerender but I don't think it should be called upon a rerender.

Resources (screenshots, code snippets etc.)



We will add such an event in the next release. Thank you for the suggestion.


clickstudioltd priority commented 2 years ago

Thank you for considering this.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 3.0.0
  • Device: PC
  • Browser: Mozilla Firefox
  • OS: Windows 10
  • Provided sample code: Yes
  • Provided link: No
Tags