-
Notifications
You must be signed in to change notification settings - Fork 297
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
Generic type on renderListItem
#382
Comments
Hi there! Do you mean specifically this signature? react-native-dropdown-picker/index.d.ts Line 183 in 00aa22c
What would you propose, expressed as a valid signature to use in its place? |
yes, i wanted use it to customize list item with my own attributes |
|
I found out that in my use case, if I replace the renderListItem with the list item that makes the selector to fit in with my project, the onPress of the List Item does not fire thus making it impossible for the selection of items to propagate fully.
If I comment out the |
@peterchibunna that's an interesting finding - but I'm not sure what it has to do with generic typing in the typescript definitions? 🤔 |
@mikehardy I have the same issue, providing a custom |
@ShyamKatti that is the same unrelated problem to this actual issue. You saying "I have the same issue" makes me read the title of this issue, which is in reference to a typescript definition. But then your next statement has nothing to do with typescript definitions 🤔 so I'm confused. Probably best to open a new issue with https://stackoverflow.com/help/minimal-reproducible-example but please note that even better than that is to do the work in node_modules with the javascript files to figure out the problem and post a PR. I don't use custom renderListItems so this is not a use case of mine, I won't have time fix it other than just in general collaborating with developers that propose reasonable PRs to help get them merged and released. Future people: If you have a PR that fixes types, please discuss here. If you want to write something that is not about a generic type on renderListItems, then post elsewhere please so the issue is focused and actionable. |
@mikehardy Sorry for the confusion, I meant the issue where the a list item cannot be selected on passing custom |
hi, is there a solution for this? |
This happens because an invalid type definition in I've submitted a PR with the correct definition. Until it's accepted, you can either just call the
or update the interface yourself if you only build locally. |
Should it receive generic type.. so we can put more arguments on item list
The text was updated successfully, but these errors were encountered: