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.

How add custom value to textInput when press on cell

See original GitHub issue

It seems that the getDefaultValue only runs once and it does not help me when I put my custom state on that property.

I’m test too with textInputProps sending onChangeText function, but it’s no good, because when the _onPress is executed it is forced to take the value of rowData.description and I lose control over that state. code here.

I would like to know if there is a way to achieve this and if it is not possible, then I would appreciate it being implemented for an upcoming version

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
waweru-kamaucommented, Jan 7, 2019

I found the solution:

You can use setAddressText(“…”).

On your autocomplete component get a reference to the object: <GooglePlacesAutocomplete ref={(instance) => { this.locationRef = instance }} …/>

and then: this.locationRef.setAddressText(“New York, NY”) https://github.com/FaridSafi/react-native-google-places-autocomplete/issues/158#issuecomment-372740996

0reactions
waweru-kamaucommented, Jan 7, 2019

@mayask Can you write example how to use setAddressText component method?

@spacewideweb we’re you able to solve this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - Pass TextInput value to imported component
i have a custom header with the drawer menu open button and search bar. i have a separate component for search view. which...
Read more >
How to push value from textbox in VBA UserForm ... - YouTube
Microsoft Office Excel 2016 and VBA. How to push value from textbox in VBA UserForm to Cell in Excell 2016. 49K views 6...
Read more >
Control data entry formats with input masks - Microsoft Support
Open the object in Design View, and click the field where you want to add the custom input mask. · Click the Build...
Read more >
Text input control in Power Apps - Microsoft Learn
The user can specify data by typing into a text-input control. Depending on how you configure the app, that data might be added...
Read more >
Video: Input and error messages - Microsoft Support
Select the cells that you want to create a message for, and click Data Validation. On the Input Message tab, check the box...
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