-
Notifications
You must be signed in to change notification settings - Fork 129
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
ModalSelector renderItem typing error #168
Comments
same for me |
Same |
same here |
Adding PropTypes.array to line 32 solves the problem: |
@joseclaudiojr |
This in no way fixes the problem mentioned in this issue. Your fix isn't even a typescript change. |
This repo uses prop-types to document the intended types of properties passed to components. (https://www.npmjs.com/package/prop-types) |
This has nothing to do with prop types and the style prop type has nothing to do with renderItem. I am describing a TypeScript error. I suggest learning the difference between the two before submitting a PR for packages |
Well, it looks like you didn't really check the solution. Anyway, i was having a typescript issue and that worked for me. Good luck in finding your answer, looks like you gonna need it.... |
Again PropTypes are not for TypeScript, literally look it up. PropTypes provide typing for JAVASCRIPT. Type Script is only affected by changes to type definition files. In this case index.d.ts. Again your change is still not even related to the issue you commented on. Please try and follow standard issue guidelines. Open a separate issue if you're having problems with the PropTypes |
Thanks for your interest in this issue, @scousino and @joseclaudiojr :-) I think I found a fix: 539673a Could you test default branch and confirm if this works for you or not? You could test default branch (master) by installing like this: |
please also add methods
|
They are added in another PR: #161 (or at least |
Fixed in v2.0.9 |
Somewhere between versions 2.0.2 and 2.0.7 the typings for the props on ModalSelector were changed to include FlatListProps. Since that change, TypeScript now throws an error unless you provide the renderItem property that is required for a FlatList. However, I know that is wrong, because this package already takes care of providing a renderItem implementation in its code.
I believe the solution is to utilize Pick, Omit, Exclude from TypeScript in some way, but I'm not familiar with exactly how
The text was updated successfully, but these errors were encountered: