lawnstarter / react-native-picker-select

🔽 A Picker component for React Native which emulates the native <select> interfaces for iOS and Android
https://npmjs.com/package/react-native-picker-select
MIT License
1.74k stars 499 forks source link

Placeholder fontFamily go back to default font when picking selection and later pressing placeholder again #378

Open henaharon opened 3 years ago

henaharon commented 3 years ago

Describe the bug
Placeholder fontFamily go back to default font when picking a selection and later pressing placeholder again.

To Reproduce
Steps to reproduce the behavior:

  1. Click on selector
  2. Pick a selection
  3. Pick placeholder selection

Expected behavior
fontFamily remains the same (as mention in style object) after changing selections. Screenshots
WhatsApp Image 2020-10-14 at 16 43 08 WhatsApp Image 2020-10-14 at 16 43 19 WhatsApp Image 2020-10-14 at 16 43 43

Additional details

Reproduction and/or code sample
RNPickerSelect

` <RNPickerSelect doneText={'סיים'} value={categorySelect} placeholder={{ label: 'סנן לפי איזור, value: 0, color: colors.PICKERS_RED, }} items={list.map((item) => ({ label: item.name, value: item.id, }))} onValueChange={(value) => { this.onCheckChanged(value); }} style={{inputIOS: { alignItems: 'flex-end', justifyContent: 'space-between',

                        height: height * 0.04,
                        width: width * 0.36,
                        fontSize: width * 0.045,
                        fontFamily: "Rubik-Bold",
                        textAlign: 'right',
                        paddingLeft: width * 0.02,
                        backgroundColor: colors.white
                    },
                    placeholder: {
                        fontFamily: "Rubik-Bold", // expected fontFamily
                        color: colors.PICKERS_RED
                    },}}
                    Icon={() => <Image source={require('../../../assets/arrow_dropdown.png')} style={styles.downArrowIcon} />}
                    useNativeAndroidPickerStyle={false}
                />`