react-native-floating-label-text-input icon indicating copy to clipboard operation
react-native-floating-label-text-input copied to clipboard

text not changed after calling function

Open gerard0315 opened this issue 8 years ago • 5 comments

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

gerard0315 avatar Jun 02 '16 13:06 gerard0315

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

eyaleizenberg avatar Jun 05 '16 14:06 eyaleizenberg

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

gerard0315 avatar Jun 06 '16 09:06 gerard0315

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

eyaleizenberg avatar Jun 06 '16 09:06 eyaleizenberg

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

gerard0315 avatar Jun 06 '16 09:06 gerard0315

Is this still an issue?

eyaleizenberg avatar Oct 30 '16 06:10 eyaleizenberg