-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
VerificationInput uses forwardRef but TS defs don't expose that #46
Comments
Thanks for the feedback. I am not too familiar with React typings, but it seems like |
Thanks for looking at it! Since the props don't contain |
I decided to go with The change is released as version Btw, do you think it would be a good idea to introduce a prop like: delimiterChars=" -_" I'm asking since the component by default already ignores blanks when pasting a value. |
Yes please, if you can! |
Another option would be to ignore everything that is not a valid character. I'm gonna give this some more thought. |
That might be a good option as well |
Hi,
Thanks for the awesome component 😄!
Unfortunately, I hit a little snag:
In your code, you expose the
ref
passthrough 🎉react-verification-input/src/index.js
Line 9 in acc512a
But the definitions declare just a plain functional component
react-verification-input/src/index.d.ts
Line 23 in acc512a
Could you please add the missing
ref
prop? or maybe make use ofPropsWithoutRef<P> & RefAttributes<T>
like here?https://github.com/DefinitelyTyped/DefinitelyTyped/blob/9cc04052f7e17abbfb2a8a1636ff9fa456b01552/types/react/index.d.ts#L805
I'm using the ref to listen to
paste
events so that I can remove dashes from the clipboard text since I want to ignore them.For now, it's ok since I can
// @ts-ignore
itThe text was updated successfully, but these errors were encountered: