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 ref support #28

Open
Dan503 opened this issue Mar 12, 2022 · 0 comments
Open

Add ref support #28

Dan503 opened this issue Mar 12, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Dan503
Copy link
Owner

Dan503 commented Mar 12, 2022

It is written as a functional component so ref support needs to be explicitly added using forwardRef

I would expect the structure to be like this:

const TimeInputPolyfill = (props) => {
  // main component code
}

const _TimeInputPolyfill = forwardRef((props, forwardedRef) => (
    <TimeInputPolyfill {...props} forwardedRef={forwardedRef} />
))

export default _TimeInputPolyfill 

The TypeScript types might be tricky to update.

@Dan503 Dan503 added enhancement New feature or request good first issue Good for newcomers labels Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant