KiraLT / torrent-stream-server

HTTP server to convert any torrent to video stream
MIT License
241 stars 105 forks source link

Bump react-hook-form from 7.16.0 to 7.18.1 in /frontend #280

Closed dependabot[bot] closed 3 years ago

dependabot[bot] commented 3 years ago

Bumps react-hook-form from 7.16.0 to 7.18.1.

Release notes

Sourced from react-hook-form's releases.

Version 7.18.1

😔 fix 6933 by revert FieldPathWithValue type #6753 (#6934) 🧢 close #6928 prevent schema error before user's action (#6929)

thanks to @​mnigh @​kotarella1110 @​barrymay

Version 7.18.0

👨‍👨‍👦 schema error parent level look up (#6869)

const validationSchema = object().shape({
  questions: array()
    .min(1, "Array cannot be empty")
    .of(
      object().shape({
        text: string().required("Some text is required")
      })
    )
});

function App() { const { control, formState: { errors }, register } = useForm({ mode: "onChange", resolver: yupResolver(validationSchema), defaultValues: { questions: [ { text: 'test' } ] } }); const { fields, remove } = useFieldArray({ control, name: "questions", }); console.log(errors); return ( <form> {fields.map((question, questionIndex) => ( <div key={question.key}> <input {...register(questions[${questionIndex}].text)} />

      &lt;button type=&quot;button&quot;
        onClick={() =&gt; {
          remove(questionIndex);
        }}
      &gt;
        Remove
      &lt;/button&gt;
    &lt;/div&gt;
  ))}

</tr></table>

... (truncated)

Changelog

Sourced from react-hook-form's changelog.

[7.18.1] - 2021-11-02

  • revert FieldPathWithValue

[7.18.0] - 2021-10-28

Added

  • bring back FieldPathWithValue
  • schema errors parent object look up
const validationSchema = object().shape({
  questions: array().min(1, 'Array cannot be empty'),
});

// the above schema will be picked up by field array action // the logic applies to group error object eg checkboxes <button type="button" onClick={() => { remove(questionIndex); }} > Remove </button>;

[7.17.0] - 2021-10-02

Added

  • new type FieldPathWithValue to improve generic components type support
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' }, </tr></table>

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 3 years ago

Superseded by #283.