-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
FieldServerComponent cannot be passed functions in serverProps
#9895
Labels
Comments
sacha-c
added
status: needs-triage
Possible bug which hasn't been reproduced yet
validate-reproduction
labels
Dec 11, 2024
github-actions
bot
removed
the
status: needs-triage
Possible bug which hasn't been reproduced yet
label
Dec 11, 2024
Nice! Thank you for addressing this so quickly! 🚀 |
Thank you for reporting this! Surprised this didn't come up earlier |
🚀 This is included in version v3.6.0 |
This issue has been automatically locked. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the Bug
It seems like custom Field components are not rendered as server components.
I am trying to pass a function as a prop to a custom Field component. Since V3 we are using NextJS, I am ensuring this component is a server-side component & thus not including the
use client
directive. In addition I am passing my props using theserverProps
.However when I start the server it fails with
Functions cannot be passed directly to Client Components
Note that I've tried with Collection-level components, and there, it works! I've only experienced this issue on Field components so far
Link to the code that reproduces this issue
sacha-c@64dd976
Reproduction Steps
Have a custom component
Have a configuration which passes an unserializable prop in the Field's component:
Which area(s) are affected? (Select all that apply)
area: ui
Environment Info
The text was updated successfully, but these errors were encountered: