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

Add uncontrolled form to the nextjs example #224

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

raoufswe
Copy link
Member

@raoufswe raoufswe commented Oct 28, 2024

◀️ Context:

In React, there are two ways to build forms:

Our Next.js app already has a working example of the first approach, but we're missing implementation for the second approach—where users can access the form data upon submission similar to the Vanilla JS example we have here, so ideally we should fully test and support both ways.

🐛 Blocker

While trying to add the uncontrolled form example, I noticed that the React-wrapped version of our form components doesn't correctly attach/read the form element's value when the form is submitted, even though we're using the element-internals-polyfill.

The issue doesn’t happen when using the custom element directly in React or Vanilla JS so my rough assumption is the issue might be related to @lit/react

Screen.Recording.2024-10-28.at.17.30.02.mov

⏭️ Next step

Ensure the issue isn't from our side and reach out to the lit team if needed.

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.

1 participant