TS error in Flatlist ListHeaderComponent
srikargunnam opened this issue ยท 1 comments
srikargunnam commented
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch react-native-country-codes-picker@2.3.1
for the project I'm working on.
I couldn't spent much time on fixing this ts error, hence i just ignored the line which is causing the ts error.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-country-codes-picker/index.tsx b/node_modules/react-native-country-codes-picker/index.tsx
index 1d2131f..fc7e6e2 100644
--- a/node_modules/react-native-country-codes-picker/index.tsx
+++ b/node_modules/react-native-country-codes-picker/index.tsx
@@ -394,6 +394,7 @@ export const CountryList = ({
style={[style?.itemsList]}
keyboardShouldPersistTaps={'handled'}
renderItem={renderItem}
+ // @ts-ignore
ListHeaderComponent={(popularCountries && ListHeaderComponent && !searchValue ) &&
<ListHeaderComponent countries={preparedPopularCountries} lang={lang}/>}
{...rest}
This issue body was partially generated by patch-package.
mawais2001 commented
this method is difficult bro