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

Value does not sync from parent to child component #507

Closed
1 task done
mateeyow opened this issue Nov 9, 2024 · 2 comments
Closed
1 task done

Value does not sync from parent to child component #507

mateeyow opened this issue Nov 9, 2024 · 2 comments

Comments

@mateeyow
Copy link

mateeyow commented Nov 9, 2024

  • Before posting an issue, read the FAQ and search the previous issues.

Description
When we do Componentization of the form, the parent will not be able to subscribe to any changes from the child component.

Please see MRE here - https://www.sveltelab.dev/wl0rfm8u6rfld7z.

Notice that when I type to any fields the SuperDebug field does not get updated. Am I missing something? Thanks
image

@mateeyow mateeyow added the bug Something isn't working label Nov 9, 2024
@ciscoheat
Copy link
Owner

Hi, you're creating a new instance of superForm in the component, that's why it's not working. You need to pass the SuperForm object created in +page.svelte instead of the SuperValidated data.

@ciscoheat ciscoheat removed the bug Something isn't working label Nov 12, 2024
@mateeyow
Copy link
Author

Got it, 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

No branches or pull requests

2 participants