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

Make useCondition() more type-safe - v0.1.2 #6

Merged
merged 8 commits into from
Oct 13, 2024
Merged

Make useCondition() more type-safe - v0.1.2 #6

merged 8 commits into from
Oct 13, 2024

Conversation

micahjon
Copy link
Owner

@micahjon micahjon commented Oct 13, 2024

Fixes #4

Make useCondition() more type-safe by only allowing field paths that are associated with keys of the conditional logic config instead of every possible field path associated with the form schema.

If a user specifies an invalid field path (not associated with a condition), we'll still return true (in the returned array) but will also log a warning in the console.

@micahjon micahjon changed the title Make useCondition() more type-safe Make useCondition() more type-safe - 0.1.2 Oct 13, 2024
@micahjon micahjon changed the title Make useCondition() more type-safe - 0.1.2 Make useCondition() more type-safe - v0.1.2 Oct 13, 2024
@micahjon micahjon merged commit ecb56e9 into main Oct 13, 2024
2 checks passed
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.

Flag invalid conditional logic field name passed to useCondition()
1 participant