Skip to content

Commit

Permalink
Fix open file button in header
Browse files Browse the repository at this point in the history
  • Loading branch information
l0drex committed Apr 8, 2023
1 parent 6f5be2c commit 965982f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ function Header(props) {
<form id="open-file">
<input type="file" hidden ref={fileInput} accept="application/json"
onChange={() => parseFile(fileInput.current.files[0]).then(saveDataAndRedirect)}/>
<button className="icon-only" onClick={() => {
<button className="icon-only" onClick={e => {
e.preventDefault();
fileInput.current.click();
}}>📁
</button>
Expand Down

0 comments on commit 965982f

Please sign in to comment.