wmcadigital / wmn-refund

Step by step form for refunds of transport tickets
https://refund.wmnetwork.co.uk
0 stars 4 forks source link

[skip netlify]: Bump react-hook-form from 6.11.5 to 7.41.0 #680

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps react-hook-form from 6.11.5 to 7.41.0.

Release notes

Sourced from react-hook-form's releases.

🎄 Version 7.41.0

👉 NEW values props

The following syntax will react to values prop update/changes.

  • values will be reactive to update/change and reset accordingly
  • provide a reset option to keep dirty/touched values potentially
const values = await fetch('API')

useForm({ values, // will reset the form when values updates // resetOptions: { // keepDirtyValues: true // } })


👉 NEW async defaultValues props

The following syntax will support async defaultValues, so we will manage the reset form internally and update formState accordingly.

  • promise will only be resolved once during useForm() call
  • It's possible to supply resetOptions as well
const { formState: { isLoading } } = useForm({
  defaultValues: fetch('API')
  // resetOptions: {
  //   keepDirtyValues: true
  // }
})

React use API

useForm({
  defaultValues: use(fetch('API'))
  // resetOptions: {
  //   keepDirtyValues: true
  // }
})

https://user-images.githubusercontent.com/10513364/208200735-6248b069-9b7d-4bd1-9742-55d1ef8d238a.mov

🙋 What's the difference between values and defaultValues

... (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 1 year ago

Superseded by #684.