- Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Description
When using a FormSelect, its name field is type checked, but its options are not.
type FormData = { enum: "option1" | "option2" | "option3"; }; const form = useForm({ enum: "option1" } as FormData); // ... <FormSelect form={form} name="enum"> <option value="option1">Option 1</option> <option value="option2">Option 2</option> <option value="option3">Option 3</option> {/* Next line does not show error, but option4 is invalid! */} <option value="option4">Option 4</option> </FormSelect>;This should be possible to typecheck by only accepting children of a specific type in FormSelect.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request