placeholderTextColor not being set
See original GitHub issueDescribe the bug
The placeholderTextColor
is not being set whenever one wants to set a different placeholder text to the ones you want to display as values. Such as this:
To Reproduce
- Create a
Picker
component - Change the
placeholderTextColor
- Change the default placeholder to be a different value than the one displayed on
items
Expected behavior
The placeholder text color should change to red. However, because of this line: https://github.com/lawnstarter/react-native-picker-select/blob/master/src/index.js#L193 the color
attribute is never set.
Screenshots
- Device: iOS Simulator
- OS: iOS 12
- react-native-picker-select version: 4.2.1
- react-native version: 0.55.4
- react version: 16.4.0
Reproduction and/or code sample In order to reproduce the behaviour, just create the following component:
const placeholderTextColor = 'red';
const CustomPicker = () =>
<Picker
placeholderTextColor="red"
placeholder={{label: 'Select an option', value: null}}
doneText="Select"
items={[{label: 'test 0', value: 0}, {label: 'test 1', value: 1}]}
value={null}
onValueChange={v => console.log(v)}
/>
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
ReactNative TextInput placeholderTextColor doesn't seem to ...
I was having issues getting the opacity to work, so I found the above ... this.state.location.length to see if the field is empty...
Read more >How to Change Placeholder Text Color? - GeneratePress
Hello,. I tried all color options from the Customizer but the placeholder text color couldn't be changed. In the checkout there are ...
Read more >placeholder - CSS: Cascading Style Sheets - MDN Web Docs
Placeholder text typically has a lighter color treatment to indicate that it is a suggestion for what kind of input will be valid,...
Read more >How To Change Input Placeholder Color - W3Schools
Step 2) Add CSS: In most browsers, the placeholder text is grey. To change this, style the placeholder with the non-standard ::placeholder selector....
Read more >Change UITextField placeholder text color with Swift
If not, you will need a text field set up for this tutorial. I have a text field outlet and I will be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@NathanNovak I did this and it works :
I too have this issue, tried the above but with no luck