79164859

Date: 2024-11-07 02:44:15
Score: 1
Natty:
Report link

I just had to work through the same issue.

My solution (applied to the code in your original question) was to add an e.preventDefault() statement to the onButtonClick function.

...

const onButtonClick = (e) => {
  e.preventDefault()
  inputFile.current?.click();
};

return (
  ...
);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Thomas