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

feat: mount method on FormApi #496

Merged
merged 4 commits into from
Nov 1, 2023
Merged

Conversation

aadito123
Copy link
Member

@aadito123 aadito123 commented Oct 31, 2023

As discussed in #493

Edit:
Should mention that onMountAsync and onMountAsyncDebounceMs were removed since onMount callbacks should only run once.

Copy link

codesandbox-ci bot commented Oct 31, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Member

@crutchcorn crutchcorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small change I'd like us to make prior to merge.

Also, let's add form.mount() to all of the form-core tests. It'll help us avoid refactoring/debugging those tests in the future in case the mount ever becomes required.

packages/form-core/src/FormApi.ts Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Attention: 19 lines in your changes are missing coverage. Please review.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Coverage Δ
packages/form-core/src/utils.ts 89.13% <ø> (ø)
packages/react-form/src/createFormFactory.ts 100.00% <100.00%> (ø)
packages/react-form/src/formContext.ts 83.33% <ø> (ø)
packages/react-form/src/useForm.tsx 89.47% <100.00%> (+0.58%) ⬆️
...ckages/react-form/src/useIsomorphicLayoutEffect.ts 100.00% <100.00%> (ø)
packages/solid-form/src/createFormFactory.ts 100.00% <100.00%> (ø)
packages/solid-form/src/tests/utils.ts 100.00% <100.00%> (ø)
packages/yup-form-adapter/src/tests/utils.ts 100.00% <100.00%> (ø)
packages/yup-form-adapter/src/validator.ts 100.00% <100.00%> (ø)
packages/zod-form-adapter/src/tests/utils.ts 100.00% <100.00%> (ø)
... and 7 more

📢 Thoughts on this report? Let us know!.

@crutchcorn crutchcorn merged commit 9862684 into TanStack:main Nov 1, 2023
6 checks passed
@aadito123 aadito123 deleted the form-mount branch November 20, 2023 03:03
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.

3 participants