Giter Club home page Giter Club logo

Comments (16)

mayask avatar mayask commented on July 29, 2024 2

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.

mayask avatar mayask commented on July 29, 2024 1

@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.

antonsivogrivov avatar antonsivogrivov commented on July 29, 2024

If you share this idea, I would be glad to do pull request.

from react-native-google-places-autocomplete.

antonsivogrivov avatar antonsivogrivov commented on July 29, 2024

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.

mayask avatar mayask commented on July 29, 2024

Ok, I just added a renderDescription prop for this.

1353de5

from react-native-google-places-autocomplete.

antonsivogrivov avatar antonsivogrivov commented on July 29, 2024

Thanks!

from react-native-google-places-autocomplete.

mayask avatar mayask commented on July 29, 2024

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.

mayask avatar mayask commented on July 29, 2024

Available in v1.2.5

from react-native-google-places-autocomplete.

antonsivogrivov avatar antonsivogrivov commented on July 29, 2024

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.

mayask avatar mayask commented on July 29, 2024

@tonygriv renderRow prop was exclusively added in v1.2.6

from react-native-google-places-autocomplete.

antonsivogrivov avatar antonsivogrivov commented on July 29, 2024

Awesome! Thanks a lot :)

from react-native-google-places-autocomplete.

brascene avatar brascene commented on July 29, 2024

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.

mayask avatar mayask commented on July 29, 2024

Hi. Use props.styles.description prop

from react-native-google-places-autocomplete.

brascene avatar brascene commented on July 29, 2024

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.

brascene avatar brascene commented on July 29, 2024

Found it, this is the prop I've been looking for: "row" : { height: 50 }

from react-native-google-places-autocomplete.

GerardCasadevall avatar GerardCasadevall commented on July 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.