Skip to content

Commit 9825fae

Browse files
authored
Add prevent default
It will be helpful have there preventDefault too because now when I try use this inputButton inside the <form> after click it submit the form instead of open the file browser
1 parent 83ed4ba commit 9825fae

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/components/input-button/InputButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const InputButton: React.FC<InputButtonProps> = (props: InputButtonProps) => {
5050
};
5151
function clickInput(e: React.MouseEvent<MouseEvent>): void {
5252
e.stopPropagation();
53+
e.preventDefault();
5354
let referenceInput = inputRef.current;
5455
if (referenceInput) {
5556
referenceInput.click();

0 commit comments

Comments
 (0)