[bugfix] Fixes to tablist, fileinput, checkbox

This commit is contained in:
tobi 2025-05-06 10:01:59 +02:00
commit d0c3bd80e6
4 changed files with 85 additions and 45 deletions

View file

@ -71,9 +71,6 @@ export default function ImportExportForm({ form, submitParse, parseResult }: Imp
}, [exportResult]);
const importFileRef = useRef<HTMLInputElement>(null);
const importFileOnClick = () => {
importFileRef.current?.click();
};
return (
<>
@ -109,11 +106,9 @@ export default function ImportExportForm({ form, submitParse, parseResult }: Imp
<label
className={`button with-icon${form.permType.value === undefined || form.permType.value.length === 0 ? " disabled" : ""}`}
tabIndex={0}
onClick={importFileOnClick}
onKeyDown={(e) => {
if (e.key === "Enter") {
e.preventDefault();
importFileOnClick();
importFileRef.current?.click();
}
}}
role="button"