question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get Input Text if Address not found

See original GitHub issue

I have wasted a lot of time to make it work, but this didn’t workout im using following code to setState input value but not working.

textInputProps={{
    onChangeText : (c_address) => {
        alert(c_address)
    }
}}

image

but when it comes to setState

textInputProps={{
    onChangeText : (c_address) => {
        this.setState({ address : c_address })
    }
}}

it is not showing dropdown image

if i set listViewDisplayed to true not hiding list of dropdown after choose one option from it

image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

2reactions
Jhony-Reyescommented, Jun 26, 2019

Same here!

This work

textInputProps={{
    onChangeText : text => {
        console.log(text);
    }
}}

// And this

textInputProps={{
    onChange : ({ nativeElement: { text }}) => {
        console.log(text);
    }
}}

// And
textInputProps={{
    onKeyPress : ({ nativeEvent: { key: keyValue } }) => {
       console.log(keyValue);
    }
}}

This does’nt work

textInputProps={{
    onChangeText : text => {
        this.setState({addresText: text});
    }
}}

// And this

textInputProps={{
    onChange : ({ nativeElement: { text }}) => {
        this.setState({addresText: text});
    }
}}

// And
textInputProps={{
    onKeyPress : ({ nativeEvent: { key: keyValue } }) => {
        this.setState({addresText: keyValue});
    }
}}
0reactions
bell-stevencommented, May 17, 2020

I just tried reproducing this using the setState hook, and it worked fine for me. Please open a new issue (please follow the issue template) if this is still a problem for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Check if an HTML input element is empty or has no value ...
The getElementById method returns an Element object that you can use to interact with the element. If the element is not found, null...
Read more >
<input type="text"> - HTML: HyperText Markup Language | MDN
A Boolean attribute which, if present, means this field cannot be edited by the user. Its value can, however, still be changed by...
Read more >
Validating Input | Web Accessibility Initiative (WAI) - W3C
If your web browser supports HTML5, it will not allow you to submit the form without entering text into the input field. Instead,...
Read more >
Text field - Adobe Spectrum
Text fields allow users to input custom text entries with a keyboard. ... A text field does not have a read-only option if...
Read more >
Using Cypress - Cypress Documentation
How do I get the native DOM reference of an element found using Cypress? ... Can I check that a form's HTML form...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found