From cf0b34b254c19e53091fe3f04fec9ecdbb240da8 Mon Sep 17 00:00:00 2001 From: Anders Olsson Date: Thu, 4 Jun 2026 00:36:04 +0200 Subject: [PATCH] refactor(web): FieldInput form type unknown (drop any); wire localized_text required; a11y/comment nits Co-Authored-By: Claude Sonnet 4.6 --- web/src/objects/field-input.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/src/objects/field-input.tsx b/web/src/objects/field-input.tsx index 89e5d8f..78fae4a 100644 --- a/web/src/objects/field-input.tsx +++ b/web/src/objects/field-input.tsx @@ -10,8 +10,7 @@ import { Label } from "@/components/ui/label"; type FieldDefinitionView = components["schemas"]["FieldDefinitionView"]; type LabelView = components["schemas"]["LabelView"]; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -type AnyForm = UseFormReturn<{ fields: Record }>; +type FieldForm = UseFormReturn<{ fields: Record }>; function labelIn(labels: LabelView[], lang: string): string { return ( @@ -62,7 +61,7 @@ export function FieldInput({ form, }: { definition: FieldDefinitionView; - form: AnyForm; + form: FieldForm; }) { const { t, i18n } = useTranslation(); const lang = i18n.language.startsWith("sv") ? "sv" : "en"; @@ -101,6 +100,7 @@ export function FieldInput({ ); case "boolean": + // A checkbox always has a boolean value, so `required` is a no-op here. return (
- +
{label}