react-native-picker-select: Picker style is not working
RN 0.55.4 “name”: “react-native-picker-select”, “version”: “3.1.1”,
<View style={{flex: 1}} >
<Text style={{color: '#0082c6', fontSize: 16, fontWeight: 'bold', marginLeft: 5}}>SEXO</Text>
<RNPickerSelect
placeholder={{
label: 'Seu Sexo',
value: '',
}}
items={this.state.items}
onValueChange={(value) => {
this.setState({
sexo: value,
});
}}
style={{ backgroundColor: '#000' }}
/>
</View>
I’ve tried to change the style to approximate the Picker box to the label “SEXO” but none type of styling is working. How to fix that?
Image to understand it better: img
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15
I use like this:
And working good 🤟🏻
<RNPickerSelect … style={pickerSelectStyles} useNativeAndroidPickerStyle={false} // add this line and it should work />
upon selection of the picker view textfield I want to be able to make the textfield bottom border to be blue and thicker and I’ve tried the bottomBorderColor and width but nothing seems to be changing
how can we style the picker list itself? I have tried targeting the styles using these options - inputAndroid, viewContainer, headlessAndroidContainer,inputAndroidContainer - but none of them seem to style the dropdown list.
I am trying to wrap the options on to a new line since the labels are really long.
I got mine to work with
… although the font color seems to change once an item is inputed and set to
this.props.middleBellLengthType
… I just got it to work withplaceholder={{ label: this.props.middleBellLengthType, value: this.props.middleBellLengthType}}
@sturmenta it works!
How could RNPickerSelect turn to PickerSelect!?
@AlexHooperDev i’m welcome to prs