-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update useField docs with options #4626
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4626 +/- ##
=======================================
Coverage 89.80% 89.80%
=======================================
Files 93 93
Lines 7657 7657
Branches 1348 1348
=======================================
Hits 6876 6876
Misses 774 774
Partials 7 7 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some options are not grouped correctly.
docs/src/pages/api/use-field.mdx
Outdated
| `standalone` | | `label` | | ||
| `type` | | `validateOnValueUpdate` | | ||
| `initialValue` | | `keepValueOnUnmount` | | ||
| | | `syncVModel` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label
, validateOnValueUpdate
, keepValueOnUnmount
and syncVModel
are not checkbox/radio specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the oversight. I amended my commit and also refactored into a singular column table that will show the Field options
. checkedValue
and uncheckedValue
are suffixed with "(checkbox/radio only)".
Added a simple description of how to use options with useField
Thanks! |
Added a simple description of how to use options with useField
🔎 Overview
I was searching for a way to add options (type and label) to the useField function but I had to figure this out on my own since the docs were not clear enough for me.
🤓 Code snippets/examples (if applicable)
// some code
✔ Issues affected