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

text not changed after calling function #13

Open
gerard0315 opened this issue Jun 2, 2016 · 5 comments
Open

text not changed after calling function #13

gerard0315 opened this issue Jun 2, 2016 · 5 comments

Comments

@gerard0315
Copy link

gerard0315 commented Jun 2, 2016

Hi, tried the package, looks awesome, but the input text is not changed after modifications

@gerard0315 gerard0315 changed the title change label and background color text notChanged after calling function Jun 2, 2016
@gerard0315 gerard0315 changed the title text notChanged after calling function text not changed after calling function Jun 2, 2016
@eyaleizenberg
Copy link
Owner

Hi,
Can you please give more information? steps to recreate? Version? etc..

@gerard0315
Copy link
Author

gerard0315 commented Jun 6, 2016

I am using RN 0.24.1, this is my component
<FloatLabelTextInput
selectionColor = "#D25061"
placeholder={"Name Here"}
value={this.state.Name}
onChangeTextValue={this.onNameInput}
/>

this is onNameInput function:

    onNameInput: function(event) {
        console.log('editing Name');
        this.setState({ Name: event.nativeEvent.text });
        console.log(this.state.Name);
},

tried to change onChangeText={this.setText} to onChange = {this.setText}, it actually worked but gave a type warning

@eyaleizenberg
Copy link
Owner

But it looks like you are setting the state to dogName and not Name

@gerard0315
Copy link
Author

yeah sorry thats a typo in the post but not in the actual code, fixed that.

@eyaleizenberg
Copy link
Owner

Is this still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants