Skip to content
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

Merged
merged 1 commit into from
Jan 15, 2024
Merged

Conversation

JalenWasHere
Copy link
Contributor

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

Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (39acc59) 89.80% compared to head (6d2d9ed) 89.80%.
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@logaretm logaretm left a 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.

Comment on lines 388 to 391
| `standalone` | | `label` |
| `type` | | `validateOnValueUpdate` |
| `initialValue` | | `keepValueOnUnmount` |
| | | `syncVModel` |
Copy link
Owner

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.

Copy link
Contributor Author

@JalenWasHere JalenWasHere Jan 10, 2024

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
@logaretm logaretm merged commit b96155c into logaretm:main Jan 15, 2024
7 checks passed
@logaretm
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants