NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Is not possible to change color of selected Picker Item

Open bgbraga opened this issue 8 years ago • 7 comments

I checked Picker.Item documentation and source code and apparentely there is not property to change the color of selected item.

I only found a way to change all Picker Items:

<Picker itemTextStyle={{color: '#000000'}

But I think is expected a way to change the selected item color.

bgbraga avatar Apr 04 '18 21:04 bgbraga

#1653

SupriyaKalghatgi avatar Apr 05 '18 04:04 SupriyaKalghatgi

I see that is not possible.

What is expected with that issue is implement that, not close. If is not possible to pass "selected style" to Picker, another implement suggestion:

<Picker.Item label="My Item" value="My Item" textStyle={{color: '#66bdca'}}/>

The is no problem to do that. The work is just get Picker.Item style and pass to . In that case we as Picker users will control the Picker.Item render to set the right color to right item.

@SupriyaKalghatgi I suggest to keep it open and implement that strategy. It is very simple to implement. If you accept that strategy I could do a PR.

bgbraga avatar Apr 05 '18 10:04 bgbraga

<Picker.Item color='#000' label={Platform.OS === 'ios'?<Text style={{color:'#000'}}>{label} < /Text>:label} value='' />

Rejsal avatar Sep 12 '19 11:09 Rejsal

i want to change the selected text icon, the tick icon

MedafPayDevelopers avatar Mar 29 '20 15:03 MedafPayDevelopers

I want to change the selected text icon, the tick icon too. Can someone help us, please?

yunau avatar May 16 '20 05:05 yunau

I want to change the selected text icon, the tick icon too. Can someone help us, please?

its very easy just use Variable.js (you need to generate from https://nativebase.io/customizer/), After this add a class radioColor and pass the value. then your tick icon color will be change.

3ilogics avatar Jul 21 '20 21:07 3ilogics

you can use like this for selected value from PICKER: <Picker.Item color={(this.state.selectedId =='id') ? 'red' : 'grey' } label={'Value'} value={'id'} />

sridix avatar May 01 '21 08:05 sridix