Skip to content

v4.11.6

Compare
Choose a tag to compare
@logaretm logaretm released this 09 Sep 22:25
· 132 commits to main since this release

πŸ‘• TypeScript

This release is aimed at resolving #4421

  • useForm#defineComponentBinds is now more strict and provides accurate typings for both modelValue and update:modeValue properties. Previously they were not exposed.

Try the following example.

const { defineComponentBinds } = useForm({
  validationSchema: toTypedSchema(yup.object({
    date: yup.date().required(),
    number: yup.number().required(),
    string: yup.string().required(),
    valueModel: yup.string().required(),
  })),
});

const date = defineComponentBinds('date');
const number = defineComponentBinds('number');
const string = defineComponentBinds('string');
const valueModel = defineComponentBinds('valueModel');