Open ThePlatinum opened 1 year ago
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch @react-native-picker/picker@2.4.8 for the project I'm working on.
@react-native-picker/picker@2.4.8
style
Expected behaviour:
Set itemStyle Style to apply to each of the item labels.
itemStyle
Actually behaviour:
The fontSize and fontFamily do not have impacts
fontSize
fontFamily
Here is the diff that solved my problem, partially and specific to this project:
diff --git a/node_modules/@react-native-picker/picker/js/PickerAndroid.android.js b/node_modules/@react-native-picker/picker/js/PickerAndroid.android.js index 6ab670b..0e30750 100644 --- a/node_modules/@react-native-picker/picker/js/PickerAndroid.android.js +++ b/node_modules/@react-native-picker/picker/js/PickerAndroid.android.js @@ -23,6 +23,7 @@ import AndroidDropdownPickerNativeComponent from './AndroidDropdownPickerNativeC const MODE_DROPDOWN = 'dropdown'; import type {TextStyleProp} from 'StyleSheet'; +import { defaultFontSize } from '../../../../style/global'; type PickerAndroidProps = $ReadOnly<{| children?: React.Node, @@ -103,11 +104,12 @@ function PickerAndroid(props: PickerAndroidProps, ref: PickerRef): React.Node { label, enabled, style: { - ...style, color: style.color ? processColor(style.color) : null, backgroundColor: style.backgroundColor ? processColor(style.backgroundColor) : null, + fontSize: defaultFontSize, // Resolves to a number + ...style, }, }; });
This issue body was partially generated by patch-package.
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
@react-native-picker/picker@2.4.8
for the project I'm working on.The
style
props does not work.***Expected behaviour:
Actually behaviour:
Here is the diff that solved my problem, partially and specific to this project:
This issue body was partially generated by patch-package.