Currently, events from the input handler needs to be cast as Event to pass into setFiles. The new changes in types solve this.
Another thing is input's onChange doesn't get triggered if the same file is chosen again. Cleaned the old files so that it gets triggered every time whether the files are the same or not. I suggest clearing files for the dataTransfer either by e.dataTransfer.clearData().
Currently, events from the input handler needs to be cast as
Event
to pass intosetFiles
. The new changes in types solve this.Another thing is
input
'sonChange
doesn't get triggered if the same file is chosen again. Cleaned the old files so that it gets triggered every time whether the files are the same or not. I suggest clearing files for thedataTransfer
either bye.dataTransfer.clearData()
.