question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while updating property 'colors' of a view managed by AndroidTextInput in react-native-picker when using useNativeAndroidPickerStyle={false}

See original GitHub issue

Describe the bug
When using useNativeAndroidPickerStyle={false}, getting error as Error while updating property 'colors' of a view managed by AndroidTextInput in react-native-picker on selecting a picker item.

Screenshots

Screenshot_2020-06-04-12-16-30-850_com test

Additional details

  • Device: xiaomi redmi note 4
  • OS: Android 6
  • react-native-picker-select version: 7.0.0
  • react-native version: 0.59.8
  • react version: 16.8.3

Reproduction and/or code sample

         <RNPickerSelect
        	useNativeAndroidPickerStyle={false}
            onValueChange={(value) => console.log(value)}
            items={[
                { label: 'Football', value: 'football' },
                { label: 'Baseball', value: 'baseball' },
                { label: 'Hockey', value: 'hockey' },
            ]}
        />

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ryanmcommented, Jul 8, 2020

@akhilsanker I encountered this bug. The solution was to set a color property on the inputAndroid style object. The value of the color property can’t be an abbreviated hex code like ‘#000’, it has to be like ‘#000000’ or ‘black’.

0reactions
ryanmcommented, Jul 15, 2021

@taekkuda I re-read my comment (from over a year ago). It looks like GitHub’s comment parser changed what I wrote in single quotes. This:

…an abbreviated hex code like ‘#0’, it has to be like ‘#0’ or ‘black’.

should be:

…an abbreviated hex code like #000, it has to be like #000000 or black.

Even now I see GitHub’s comment parser has added a black circle which I am not intending.

I do not remember any more about the solution than that. Hope this helps you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while updating property color of a view managed by ...
Describe the bug If I set the prop useNativeAndroidPickerStyle={false} I get this error when selecting an option from the picker.
Read more >
Error while updating property 'placeholder' of a view managed ...
The input's props placeholder receive string, just simply covert it to string. const id = this.props.id + "".
Read more >
@react-native-picker/picker - npm
React Native Picker for iOS, Android, macOS, and Windows. ... Start using @react-native-picker/picker in your project by running `npm i ...
Read more >
How to use react-native-picker-select - LogRocket Blog
react-native-picker -select, a powerful React Native component that gives you access to the native iOS and Android select interface.
Read more >
react-native-picker-select | Yarn - Package Manager
Will attempt to locate a matching item from the items array by checking each item's value property. If found, it will update the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found