Topic: MDBFileUpload how to detect click event for Remove button
clickstudioltd priority asked 1 year ago
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.
- I wish there was a method like
onRemoveClickor even a reference to the Remove button to alleviate this issue, but there is none.
- Right now, the only way that we can know Remove is clicked is by
getInputFilesmethod which only gets called when you have chosen a file via the component itself and not when you have a
defaultFilealready 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.
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: 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