Skip to content

Version 7.17.0

Compare
Choose a tag to compare
@bluebill1049 bluebill1049 released this 02 Oct 00:42
· 751 commits to master since this release

✨ 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