Skip to content

Commit 347f127

Browse files
committed
[FIX]: clean input value on InputButton to allow onChange event to be triggered on Chromium browsers
1 parent 502b222 commit 347f127

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/input-button/InputButton.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ const InputButton: React.FC<InputButtonProps> = (props: InputButtonProps) => {
4848
output.push(validatedFile);
4949
}
5050
}
51-
51+
let element: HTMLInputElement | null = inputRef.current;
52+
if (element) {
53+
element.value = "";
54+
}
5255
onChange?.(output);
5356
};
5457
function clickInput(e: React.MouseEvent<MouseEvent>): void {

0 commit comments

Comments
 (0)