React-native-picker-select: how to disable underline?

Created on 20 Oct 2018  路  2Comments  路  Source: lawnstarter/react-native-picker-select

i used this

<PickerSelect
              style={{
                inputIOS: AppStyles.picker
              }}
              underline={undefined}
              placeholder={{ label: 'Provincia...', value: null }}
              items={this.state.provincias}
              onValueChange={this.onSelectProvinciaChange}
            />

but the underline still there

Most helpful comment

solved, the underline must be in style attr with a opacity 0 as a hacky hide attr

<PickerSelect
              style={{
                inputIOS: AppStyles.picker,
                underline: { opacity: 0 }
              }}
              placeholder={{ label: 'Provincia...', value: null }}
              items={this.state.provincias}
              onValueChange={this.onSelectProvinciaChange}
            />

All 2 comments

solved, the underline must be in style attr with a opacity 0 as a hacky hide attr

<PickerSelect
              style={{
                inputIOS: AppStyles.picker,
                underline: { opacity: 0 }
              }}
              placeholder={{ label: 'Provincia...', value: null }}
              items={this.state.provincias}
              onValueChange={this.onSelectProvinciaChange}
            />

use borderTopWidth: 0

Was this page helpful?
0 / 5 - 0 ratings