Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextInput doesn't work with placeholderTextColor and conflict to transparent #1011

Closed
ele828 opened this issue Apr 25, 2015 · 7 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ele828
Copy link

ele828 commented Apr 25, 2015

  1. The placeholderTextColor props doesn't work.
  2. When I set the Input 's style of backgroundColor to transparent, the Placeholder words is gone.
    image
@brentvatne
Copy link
Collaborator

See #997 - try pulling down that diff to see if it fixes your problem

@ele828
Copy link
Author

ele828 commented Apr 25, 2015

@brentvatne Yes, it works well. Whether transparent or solid background. thanks

@drkibitz
Copy link
Contributor

When experimenting with an earlier version of react-native I made an implementation of placeholder that was different than this, but find it useful. Basically placeholder propType is an object with shape of {text: string, style: {color: string, fontSize: number, fontStyle: string, fontWeight: number, fontFamily: string}. This way it's a unified prop. Then on the UIKit side, all font attributes default to properties in self.font or defaultView.font.

If anyone is interested in this, happy to make a PR.

@brentvatne
Copy link
Collaborator

cc @vjeux ^

@vjeux
Copy link
Contributor

vjeux commented Apr 26, 2015

A more React Native-like api would be

<TextInput placeholderText="abc..." placeholderStyle={{ color: 'red' }} />

Where placeholderStyle overrides style attributes

@brentvatne
Copy link
Collaborator

Thanks @vjeux, that looks good to me - added that to #991. @drkibitz once #991 is complete do you want to try implementing that?

@bimawa
Copy link
Contributor

bimawa commented Apr 27, 2015

@vjeux, @brendanv I, too, is more like it. I could take up the implementation of styles for textInput.

@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

6 participants