Open RobertSasak opened 1 year ago
Came to mention the same thing. If I switch to the react-native FlatList all the errors go away.
Hi @GollyJer @RobertSasak, Thanks for reporting the issue. We will look into it.
the keyExtractor
prop also does not infer the data
prop type.
Same problem here. Versions:
"@gluestack-style/react": "^1.0.8",
"@gluestack-ui/config": "^1.0.3",
"@gluestack-ui/themed": "^1.0.8",
I had to do this (maybe it can help someone):
<FlatList
data={playersData?.playersByClub}
showsVerticalScrollIndicator={false}
renderItem={({ item, index }) => (
<PlayerListItem
player={item as PlayerItemFragment}
index={index}
setSelectedPlayer={setSelectedPlayer}
/>
)}
keyExtractor={(item) => (item as PlayerItemFragment)._id}
/>
With react-native FlatList, no problems... Note that also SectionList has the same problem, and i couldn't find a workaround there (can someone help?).
Thanks a lot, love this library.
Are there any updates? this is still an issue for me
This is still an issue in @gluestack-ui/themed": "^1.1.25"
, any updates on this?
Thanks!
It's the same issue as styled components has. Since all gluestack components wrapped in styled function it breaks any generic a component has
+1
+1
+1
Textarea
also have the same problem.
Changing the version of @gluestack-ui/themed
from ^1.1.29
to 1.1.29
can temporarily solve this problem.
"@gluestack-style/react": "^1.0.56",
"@gluestack-ui/config": "^1.1.18",
"@gluestack-ui/themed": "1.1.29",
Description
FlatList renderItem is missing types
CodeSandbox/Snack link
https://snack.expo.dev/@robert.sasak/gluestack-flatlist-lost-types
Steps to reproduce
For a comparison there is also a pure FlatList implementation that have correct types.
gluestack-ui Version
0.1.33
Platform
Other Platform
No response
Additional Information
Here is an actual error in Snack
There is also an addional error which I do not experience in my project. I do not think that this is related.