✨ Add support for generic components using FieldPathWithValue
(#6562)
type ExpectedType = { test: string };
const Generic = <FormValues extends FieldValues>({
name,
control,
}: {
name: FieldPathWithValue<FormValues, ExpectedType>;
control: Control<FormValues>;
}) => {
const {
field: { value, ...fieldProps },
} = useController<FormValues, ExpectedType>({
name,
control,
defaultValue: { test: 'value' },
});
return <input type="text" value={value.test} {...fieldProps} />;
};
⚙️ migrate from Select.options to Select.selectedOptions (#6678) (#6687)
🐞 fix #6683 trigger regression with isValid subscription (#6686)
Thanks to @julienfouilhe and @krnlde