xcarpentier / react-native-country-picker-modal

🇦🇶 Country picker provides a modal allowing a user to select a country from a list. It display a flag next to each country name.
https://reactnative.gallery/xcarpentier/country-picker
MIT License
1.08k stars 802 forks source link

Loading emojis are slow #288

Closed ghost closed 4 years ago

ghost commented 4 years ago

The latest version, loading emojis are very slow and also dont display on android 5.0.2. There is no emojis displayed on android 5.0.2 but on android 6 and above display as well. Also this version is very slow when loading emojis

"react-native-country-picker-modal": "^1.9.8"

coutrny

Vitalik7 commented 4 years ago

The same issue

ghost commented 4 years ago

I updated toV 1.10.0 but the issue still is available.

xcarpentier commented 4 years ago

Can you provide your code?

ghost commented 4 years ago

This is my code:

<View style={{paddingBottom: 5, paddingLeft: 10}}>
     <CountryPicker
         countryCode={state.cca2}
         withCallingCode
         withFilter
         onSelect={onCountryValue}
         filterProps={{
             placeholder: 'کشور فعلی تان انتخاب نمایید',
         }}
         flatListProps={{
             windowSize: 100,
             maxToRenderPerBatch: 50,
             removeClippedSubviews: true,
             updateCellsBatchingPeriod: 100
         }}
      />    
</View>

And onSelect function:

    const onCountryValue = value => {
        try {
            if(_isMounted){
                setState({type: 'cca2', value: value.cca2});
                setState({type: 'callingCode', value: value.callingCode});
                setState({type: 'country', value: value.name});
            }
        } catch (err) {
            console.log('Error in onCountryValue', err);
        }
    }
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ghost commented 4 years ago

Still waiting for this package please make as it was in version without hooks that time was fast.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.