siemiatj / react-native-modal-dropdown

Fork of the original https://github.com/sohobloo/react-native-modal-dropdown
MIT License
119 stars 98 forks source link

Add optionalProps for <Text> for allowFontScaling={false} #5

Closed lc3t35 closed 4 years ago

lc3t35 commented 4 years ago

from https://github.com/sohobloo/react-native-modal-dropdown/issues/243

On Android, fonts are automatically adjusted, to prevent this you can add allowFontScaling={false} props for . Current implementation does not include a way to inject such props in Text, adding dropdownTextProps in props would be nice.

const row = !renderRow ?
      (<Text style={[
        styles.rowText,
        dropdownTextStyle,
        highlighted && styles.highlightedRowText,
        highlighted && dropdownTextHighlightStyle
      ]}
      {...dropdownTextProps}
      >
        {rowData}
      </Text>) :