[chore/bugfix] fix import file on click (#4016)

This commit is contained in:
tobi 2025-04-15 11:17:45 +02:00 committed by GitHub
parent 0ce9bed3d1
commit 245d6db979
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,8 +71,7 @@ export default function ImportExportForm({ form, submitParse, parseResult }: Imp
}, [exportResult]);
const importFileRef = useRef<HTMLInputElement>(null);
const importFileOnClick = (e) => {
e.preventDefault();
const importFileOnClick = () => {
importFileRef.current?.click();
};
@ -114,7 +113,7 @@ export default function ImportExportForm({ form, submitParse, parseResult }: Imp
onKeyDown={(e) => {
if (e.key === "Enter") {
e.preventDefault();
importFileOnClick(e);
importFileOnClick();
}
}}
role="button"