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

Forward refs to most components #47

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Forward refs to most components #47

merged 1 commit into from
Aug 2, 2023

Conversation

sandhose
Copy link
Member

@sandhose sandhose commented Aug 1, 2023

This makes it so that most components properly forward their ref to the underlying DOM node.
I needed this on the Form.Root element mostly, to be able to clear it, but I extended it to most interactive components.

One notable exception is the <Button> component (and therefore the <Form.Submit> component), because it is a mess to type correctly because of the generic type on it

@sandhose sandhose requested a review from a team as a code owner August 1, 2023 15:44
@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 27219da
Status: ✅  Deploy successful!
Preview URL: https://234973fe.compound-web.pages.dev
Branch Preview URL: https://quenting-forward-ref.compound-web.pages.dev

View logs

Copy link
Contributor

@germain-gg germain-gg left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you

@germain-gg germain-gg merged commit f9fe675 into main Aug 2, 2023
7 checks passed
@germain-gg germain-gg deleted the quenting/forward-ref branch August 2, 2023 08:00
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.

2 participants