-
Notifications
You must be signed in to change notification settings - Fork 47
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
Placeholder #29
Comments
Hi, I did not understand the question. |
So, on normal form elements you can usually set a default placeholder text and a colour, usually a light grey. When the user enters a value, the placeholder is gone and the entered text is a solid black or whatever input colour you choose. |
Oh no, That become a bug then. Let me try to reproduce it. Will get back
ASAP.
…On Fri, Jun 30, 2017 at 2:21 AM, Nathan Querido ***@***.***> wrote:
So, on normal form elements you can usually set a default placeholder text
and a colour, usually a light grey. When the user enters a value, the
placeholder is gone and the entered text is a solid black or whatever input
colour you choose.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#29 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFYnVgv8h6aipDvQAUw3_zTyH9ADG4gPks5sJA43gaJpZM4OJh9I>
.
|
has this been fixed ? Could this be the reason why upon selecting a value the defaultText doesn't change ? |
How Do I access defaultText after onSelect please? you are returning value but I want to be able to get the text as well. |
Since you have selected value.. You can filter it from your data that you have and get value.. The component currently does not give text out, but I can do this as an enhancement. |
@Kazi-Yako The onselect is invoked with two arguments. Can you check if second argument is a label ? |
Yes in your function here: But in mine when I call: and use: label has the value and data is undefined. Thank you for the prompted response. |
I will fix this thanks
…On Tue, 26 Sep 2017 at 10:13 PM, Kazi-Yako ***@***.***> wrote:
Yes in your function here:
onSelect(label, value) {
this.props.onSelect(value);
this.setState({
modalVisible: false,
defaultText: label
});
}
the first one is the label which I need and the second one is the value.
But in mine when I call:
<Select
onSelect = {this.onSelect.bind(this)}
defaultText = {this.state.defaultMsg}
style = {{borderWidth : 1, borderColor : "green"}}
textStyle = {{}}
backdropStyle = {{backgroundColor : "#d3d5d6"}}
optionListStyle = {{backgroundColor : "#F5FCFF"}}>
{optionItems}
and use:
onSelect(label, data) {
this.setState({selectedLocationId : data, defaultMsg: label});
}
label has the value and data is undefined.
I am trying to capture both.
Thank you for the prompted response.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#29 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFYnVhu_ZhxOpJ3Ej7gLCECKMeP9_SzBks5smSmmgaJpZM4OJh9I>
.
|
You see. the this.props.onSelect is invoked with only value. Can you make a PR on this ? |
@Kazi-Yako |
Done! I am not sure if I did it the right but please let me know when you update the library so my team can pull that over. |
@Kazi-Yako published on NPM .. Thanks |
Going back to the original question. |
Hi, is it possible to have a separate placeholder text color and change that to the prop 'textStyle' after?
The text was updated successfully, but these errors were encountered: