googlePlaceAutocomplete | ui AutoComplete component that use google place api | Autocomplete library
kandi X-RAY | googlePlaceAutocomplete Summary
kandi X-RAY | googlePlaceAutocomplete Summary
Wrapper on top of the material-ui AutoComplete component that use google place api
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of googlePlaceAutocomplete
googlePlaceAutocomplete Key Features
googlePlaceAutocomplete Examples and Code Snippets
Community Discussions
Trending Discussions on googlePlaceAutocomplete
QUESTION
I am working on a form app on iOS 11 using Swift 4. I'd like to put the return of Google's selector (PlaceAutocomplete) in the UITextField of one of the cells of my UITableView. The issue is that despite assigning new values, the text fields remain blank. After debugging for a while it seems that something is discarding the content of my UITextField when the location is being selected.
These are the GooglePlaceAutocomplete callbacks with the result value assignment :
...ANSWER
Answered 2018-Feb-18 at 03:21Changing the cells directly is probably not a good idea, since everytime the UITableView
is reloaded, cells get recycled and depending on your tableView(_:cellForRowAt:)
implementation, your UITextField
might get overwritten or end up somewhere else.
It is a better practice to have some kind of model or state in your view controller, which holds the state for each cell in the different sections.
Change this state (for instance a list of place names) in your GooglePlacesAutocomplete delegate and call reloadData
on your tableView
to get the new data from the changed state.
In your tableView(_:cellForRowAt:)
implementation, you set inputTextField.text = place.name
before you return it, this way all cells should end up with the right place name from your internal state.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install googlePlaceAutocomplete
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page