Comments (16)
Hi @tonygriv
Using
props.styles.row
props.styles.description
props.styles. predefinedPlacesDescription
is not enough for you?
I'm curious, what's your use case?
from react-native-google-places-autocomplete.
@tonygriv
rowData
passed to it has the following structure:
{
"description": "Times Square, New York, NY, United States",
"id": "81e2bb1d8297281ef1da7fe4f3f3d17c06ef0421",
"matched_substrings": [
{
"length": 5,
"offset": 0
}
],
"place_id": "EilUaW1lcyBTcXVhcmUsIE5ldyBZb3JrLCBOWSwgVW5pdGVkIFN0YXRlcw",
"reference": "CjQtAAAAn4_hv2vzZFmn7O8BhTI5WORL-1rV9tO5QwY4andzWPLIGplv21bh0XcDIlIqdqhaEhDCBL9TYX4_BredscSE24MSGhRPvrBEPUF_lcxJjCPspbVYOrm4Jw",
"terms": [
{
"offset": 0,
"value": "Times Square"
},
{
"offset": 14,
"value": "New York"
},
{
"offset": 24,
"value": "NY"
},
{
"offset": 28,
"value": "United States"
}
],
"types": [
"route",
"geocode"
]
}
from react-native-google-places-autocomplete.
If you share this idea, I would be glad to do pull request.
from react-native-google-places-autocomplete.
I use
query={{
key: 'my_api_key',
language: config.LANG,
types: 'address',
}}
For example I would like to display only name of the street, but not the hole formatted_address
from react-native-google-places-autocomplete.
Ok, I just added a renderDescription
prop for this.
from react-native-google-places-autocomplete.
Thanks!
from react-native-google-places-autocomplete.
I'll let you know when it bones avail in the next version
Sincerely,
Maxim Yaskevich
On Sat, Oct 15, 2016 at 5:08 PM +0300, "Anton Sivogrivov" [email protected] wrote:
Thanks!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
from react-native-google-places-autocomplete.
Available in v1.2.5
from react-native-google-places-autocomplete.
I didn't pay attention to the fact that renderDescription is called in the block :(
I need to format rows for example like this:
<View>
<View>{street}</View>
<View>{someOtherLocationData}</View>
</View>
Is it possible to make these improvements?
from react-native-google-places-autocomplete.
@tonygriv renderRow
prop was exclusively added in v1.2.6
from react-native-google-places-autocomplete.
Awesome! Thanks a lot :)
from react-native-google-places-autocomplete.
I'm using renderRow prop to modify list, but I'm not able to change the height of single list item. Any ideas?
Thanks!
from react-native-google-places-autocomplete.
Hi. Use props.styles.description
prop
from react-native-google-places-autocomplete.
Isn't that prop for text style?
In renderRow I return View whose height I want to change, but it's not being applied.
from react-native-google-places-autocomplete.
Found it, this is the prop I've been looking for: "row" : { height: 50 }
from react-native-google-places-autocomplete.
I need to format rows for example like this:
<View> <Icon type="MaterialIcons" name="location-on" style={[ Styles.smallIcons, { color: Theme.darkGrayColor } ]} /> <Text>{row.structured_formatting.main_text}</Text> <Text>{row.structured_formatting.secondary_text}</Text> </View>
Is it possible ?
from react-native-google-places-autocomplete.
Related Issues (20)
- fix for Maximum update depth exceeded Feature Request HOT 3
- Feature Request: onSuccess callback HOT 1
- Bug Report - Debounce is just delaying requests, not really debouncing them HOT 3
- Bug Report
- Bug Report HOT 1
- TypeError: Cannot read property 'getItem' of undefined
- Feature Request - Add GooglePlaceDetail to renderRow HOT 1
- Restricting search to 2+ countries? HOT 1
- Use isFocused method to change state HOT 1
- Unable to Select Addresses from Dropdown in Scrollable Screen HOT 3
- onCleared: Callback after clearing autocomplete
- Close list when clicking outside, and multiple countries
- Feature Request: onClear callback
- Getting an error of XMLHttpRequest while running jest test case HOT 3
- Bug Report HOT 1
- Added placeholderTextColor as prop HOT 1
- Bug Report
- Which Google Places API to use? Places API or Places API (New) ? HOT 5
- Add props for ListFooterComponent of the FlatList
- onPress not working on android HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-google-places-autocomplete.