-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: RecursiveFormFields
type for recursive or unknown schemas
#14734
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
Conversation
🦋 Changeset detectedLatest commit: 97a5b60 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@sillvva I've fixed that error. If you update your branch with the latest code from |
Thanks @benmccann! All tests passed on the second merge. |
@dummdidumm I apologize if you're busy. Thanks for your help on PR #14748. Would I be able to get you to review this type fix as well? In order to work around this, I've had to copy all the |
Got it! I think I figured out a better solution. Will post an update shortly. |
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.
awesome, thanks so much!
fixes #14687
Right now, if the schema is
unknown
or otherwise indefinitely recursive, it treatsform.fields
as a field leaf instead of a field container. This makesform.fields.as()
incorrectly available instead ofform.fields.allIssues()
. This update fixes that by ensuringform.fields
is always treated as a field container.It also exports the
RemoteFormFields
type so that it can be used to create wrapper components.Examples
Pretend the function is a generic component
Before Fix
After Fix
No test adjustments, as this is just types. You can see the difference in the example above.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.Edits