Skip to content

Commit bf77afd

Browse files
committed
[FIX]: clean input value to allow onChange event to be triggered on Chromium browsers
1 parent b16a1d9 commit bf77afd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/dropzone/components/Dropzone/Dropzone.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,11 @@ const Dropzone: React.FC<DropzoneProps> = (props: DropzoneProps) => {
354354
remainingValids,
355355
localValidator
356356
);
357+
// Clean input element to trigger onChange event on input
358+
let element: HTMLInputElement | null = inputRef.current;
359+
if (element) {
360+
element.value = "";
361+
}
357362
handleFilesChange(output);
358363
};
359364
// validator

0 commit comments

Comments
 (0)