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